Work in progress on printing a store menu. Its buggy though

This commit is contained in:
eichhornchen
2020-12-07 20:54:53 +01:00
parent d39427f978
commit 8540a8f354
7 changed files with 68 additions and 34 deletions

View File

@ -110,8 +110,8 @@ class MainMenuDisplay(Display):
class InventoryDisplay(MenuDisplay):
message : str
def update_pad(self) -> None:
message = _("== INVENTORY ==")
self.addstr(self.pad, 0, (self.width - len(message)) // 2, message,
curses.A_BOLD | curses.A_ITALIC)
for i, item in enumerate(self.menu.values):
@ -127,3 +127,9 @@ class InventoryDisplay(MenuDisplay):
@property
def trueheight(self) -> int:
return 2 + super().trueheight
class PlayerInventoryDisplay(InventoryDisplay):
message = _("== INVENTORY ==")
class StoreInventoryDisplay(InventoryDisplay):
message = _("== STALL ==")