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)
def on_draw(self, console: tcod.console.Console) -> None: rendering.draw_main_view(self.model, console)