Example #1
0
 def on_draw(self, console: tcod.console.Console) -> None:
     """Draw inventory menu over the previous state."""
     inventory_ = self.model.player.inventory
     rendering.draw_main_view(self.model, console)
     style: Any = {"fg": (255, 255, 255), "bg": (0, 0, 0)}
     console.print(0, 0, self.desc, **style)
     for i, item in enumerate(inventory_.contents):
         sym = inventory_.symbols[i]
         console.print(0, 2 + i, f"{sym}: {item.name}", **style)
Example #2
0
 def on_draw(self, console: tcod.console.Console) -> None:
     rendering.draw_main_view(self.model, console)