Better colors

This commit is contained in:
Yohann D'ANELLO 2020-12-18 23:36:08 +01:00
parent 411744bf10
commit 4b174f26e4
2 changed files with 38 additions and 20 deletions

View File

@ -1,17 +1,17 @@
|┃
┃ ▓▓▒ ▓▓ |┃ ▓▓▒ ▓▓
┃ ▓▓ ▓▓▒ |┃ ▓▓ ▓▓▒
┃ ▓▓▓ ▓▓ ▓▓▓ ▒▒▒▒▒▒▒▒▒ |┃ ▓▓▓ ▓▓ ▓▓▓ ▒▒▒▒▒▒▒▒▒
┃ ▓▓▓▓▓▓▓▓▓▓▓▓▓ ▒▒▒▒▒▒▒▒▒▒▒▒▒ |┃ ▓▓▓▓▓▓▓▓▓▓▓▓▓ ▒▒▒▒▒▒▒▒▒▒▒▒▒
┃ ▓▓▓▓▓▓▓▓▓▓▓▓▓ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ |┃ ▓▓▓▓▓▓▓▓▓▓▓▓▓ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
┃ ▓▓▓░█▓▓▓▓▓▓░█▓▓▓ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ |┃ ▓▓▓▬█▓▓▓▓▓▓▬█▓▓▓ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
┃ ▓▓▓▓░██░░▓▓░░██░▓▓▓▓ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ |┃ ▓▓▓▓░██░░▓▓░░██░▓▓▓▓ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
━━▓▓▓▓━━ ▓▓░░░░░░░░██░░░░░░░░▓▓ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ━━▓▓▓▓━━ ▓▓░░░░░░░░ ░░░░░░░░▓▓ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▓▓▓▓▓▓ ▓░░░░░░░░░░░░░░░░░░░░▓▓▒▒▒▒▒▒▒▒▒▒▒▒ ▓▓▓▓▓▓ ▓░░░░░░░░░░░░░░░░░░░░▓▓▒▒▒▒▒▒▒▒▒▒▒▒
▓▓▓▓▓ ▓░░░░░░░░▄▄▄▄░░░░░░░▓▒▒▒▒▒▒▒▒▒▒▒▒▒ ▓▓▓▓▓ ▓░░░░░░░░▄▄▄▄░░░░░░░▓▒▒▒▒▒▒▒▒▒▒▒▒▒
▓▓▓▓▓ ▓▓░░░░░░░░░░░░░░░▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▓▓▓▓▓ ▓▓░░░░░░░░░░░░░░░▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▓▓▓▓ ▓▓▓▓░░░░░░░▓▓ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▓▓▓▓ ▓▓▓▓░░░░░░░▓▓ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▓▓▓▓▓▓▒▒░░░░░░░░░▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▓▓▓▓▓▓▒▒░░░░░░░░░▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▓▓▓▓▒░░░░░░░░░░░░▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒ ▓▓▓▓▒░░░░░░░░░░░░▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒

View File

@ -61,16 +61,34 @@ class CreditsDisplay(Display):
for j, c in enumerate(line): for j, c in enumerate(line):
bg_color = curses.COLOR_WHITE bg_color = curses.COLOR_WHITE
fg_color = curses.COLOR_BLACK fg_color = curses.COLOR_BLACK
if c == '': bold = False
if c == ' ':
bg_color = curses.COLOR_BLACK
elif c == '' or c == '' or c == '':
bold = True
fg_color = curses.COLOR_WHITE
bg_color = curses.COLOR_BLACK
elif c == '|':
bold = True # c = '┃'
fg_color = (100, 700, 1000)
bg_color = curses.COLOR_BLACK
elif c == '':
fg_color = (700, 300, 0) fg_color = (700, 300, 0)
elif c == '': elif c == '':
fg_color = (700, 300, 0) fg_color = (700, 300, 0)
bg_color = curses.COLOR_BLACK bg_color = curses.COLOR_BLACK
elif c == '': elif c == '':
fg_color = (350, 150, 0) fg_color = (350, 150, 0)
elif c == '':
fg_color = (0, 0, 0)
bg_color = curses.COLOR_BLACK
elif c == '':
c = ''
fg_color = (1000, 1000, 1000)
bg_color = curses.COLOR_BLACK
self.addstr(self.pad, y_offset + i, x_offset + j, c, self.addstr(self.pad, y_offset + i, x_offset + j, c,
fg_color, bg_color) fg_color, bg_color, bold=bold)
def handle_click(self, y: int, x: int, game: Game) -> None: def handle_click(self, y: int, x: int, game: Game) -> None:
if self.pad.inch(y, x) != ord(" "): if self.pad.inch(y - 1, x - 1) != ord(" "):
self.ascii_art_displayed = True self.ascii_art_displayed = True