Higher abstraction level on addmsg, fixes #43
This commit is contained in:
@ -14,7 +14,6 @@ class StatsDisplay(Display):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.pad = self.newpad(self.rows, self.cols)
|
||||
self.init_pair(3, curses.COLOR_RED, curses.COLOR_BLACK)
|
||||
|
||||
def update_player(self, p: Player) -> None:
|
||||
self.player = p
|
||||
@ -50,9 +49,8 @@ class StatsDisplay(Display):
|
||||
f"x{self.player.hazel}")
|
||||
|
||||
if self.player.dead:
|
||||
self.addstr(self.pad, 11, 0, _("YOU ARE DEAD"),
|
||||
curses.A_BOLD | curses.A_BLINK | curses.A_STANDOUT
|
||||
| self.color_pair(3))
|
||||
self.addstr(self.pad, 11, 0, _("YOU ARE DEAD"), curses.COLOR_RED,
|
||||
bold=True, blink=True, standout=True)
|
||||
|
||||
def display(self) -> None:
|
||||
self.pad.erase()
|
||||
|
Reference in New Issue
Block a user