This commit is contained in:
Yohann D'ANELLO
2020-12-07 21:22:06 +01:00
parent b24cc1877f
commit 57fab7db51
8 changed files with 80 additions and 70 deletions

View File

@ -110,10 +110,11 @@ class MainMenuDisplay(Display):
class InventoryDisplay(MenuDisplay):
message : str
message: str
def update_pad(self) -> None:
self.addstr(self.pad, 0, (self.width - len(self.message)) // 2, self.message,
curses.A_BOLD | curses.A_ITALIC)
self.addstr(self.pad, 0, (self.width - len(self.message)) // 2,
self.message, curses.A_BOLD | curses.A_ITALIC)
for i, item in enumerate(self.menu.values):
rep = self.pack[item.name.upper()]
selection = f"[{rep}]" if i == self.menu.position else f" {rep} "
@ -128,8 +129,10 @@ class InventoryDisplay(MenuDisplay):
def trueheight(self) -> int:
return 2 + super().trueheight
class PlayerInventoryDisplay(InventoryDisplay):
message = _("== INVENTORY ==")
class StoreInventoryDisplay(InventoryDisplay):
message = _("== STALL ==")