Display inventory content in statdisplay
This commit is contained in:
@ -35,8 +35,13 @@ class StatsDisplay(Display):
|
||||
for _ in range(self.width - len(string3) - 1):
|
||||
string3 = string3 + " "
|
||||
self.pad.addstr(2, 0, string3)
|
||||
|
||||
inventory_str = "Inventaire : " + "".join(
|
||||
self.pack[item.name.upper()] for item in self.player.inventory)
|
||||
self.pad.addstr(3, 0, inventory_str)
|
||||
|
||||
if self.player.dead:
|
||||
self.pad.addstr(3, 0, "YOU ARE DEAD",
|
||||
self.pad.addstr(4, 0, "VOUS ÊTES MORT",
|
||||
curses.A_BOLD | curses.A_BLINK | curses.A_STANDOUT
|
||||
| self.color_pair(3))
|
||||
|
||||
@ -44,4 +49,4 @@ class StatsDisplay(Display):
|
||||
self.pad.clear()
|
||||
self.update_pad()
|
||||
self.pad.refresh(0, 0, self.y, self.x,
|
||||
3 + self.y, self.width + self.x)
|
||||
4 + self.y, self.width + self.x)
|
||||
|
Reference in New Issue
Block a user