fixed typo and made window closable
This commit is contained in:
parent
91b4711ee9
commit
533a74c4fa
3 changed files with 5 additions and 4 deletions
|
|
@ -53,7 +53,7 @@ def main_draw() -> None:
|
|||
g.console.clear()
|
||||
g.screens[-1].on_draw(g.console)
|
||||
# g.context.present(g.console)
|
||||
g.sdl_renderer.copy(g.console_reder.render(g.console))
|
||||
g.sdl_renderer.copy(g.console_render.render(g.console))
|
||||
g.sdl_renderer.present()
|
||||
|
||||
|
||||
|
|
@ -82,7 +82,8 @@ def main_loop() -> None:
|
|||
tile_event = g.context.convert_event(event)
|
||||
if g.screens:
|
||||
_apply_screen_result(g.screens[-1].on_event(tile_event))
|
||||
|
||||
if isinstance(event, tcod.event.Quit):
|
||||
g.screens.pop()
|
||||
|
||||
def get_previous_screen(screen: Screen) -> Screen | None:
|
||||
"""Return the screen before `screen` in the stack if it exists."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue