diff options
author | Roman Gräf <romangraef@loves.dicksinhisan.us> | 2020-08-19 23:51:13 +0200 |
---|---|---|
committer | Roman Gräf <romangraef@loves.dicksinhisan.us> | 2020-08-19 23:51:13 +0200 |
commit | 55105b36d54c8e77251ad424fcdf8826a9d3df8d (patch) | |
tree | 4711f3b0cde0b80d2d7ce5e90ddb8e58712444ad /riseoftodmoldren/screens/start.py | |
parent | cc0fc4424363fcc2ccdbc8b0854b20147a2dd335 (diff) | |
download | Rise-of-Todmoldren-55105b36d54c8e77251ad424fcdf8826a9d3df8d.tar.gz Rise-of-Todmoldren-55105b36d54c8e77251ad424fcdf8826a9d3df8d.tar.bz2 Rise-of-Todmoldren-55105b36d54c8e77251ad424fcdf8826a9d3df8d.zip |
Diffstat (limited to 'riseoftodmoldren/screens/start.py')
-rw-r--r-- | riseoftodmoldren/screens/start.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/riseoftodmoldren/screens/start.py b/riseoftodmoldren/screens/start.py index cc33a47..7951a5c 100644 --- a/riseoftodmoldren/screens/start.py +++ b/riseoftodmoldren/screens/start.py @@ -1,17 +1,23 @@ +import pygame + +from .main import MainScreen +from .. import assets from ..base import State, StateApp class StartScreen(State): - def __init__(self): - self.background = None + background = None def on_start(self, app: 'StateApp'): if self.background is None: - from .. import assets self.background = assets.MENU2.as_tiled_surface(app.screen_rect) + def on_keydown(self, app: 'StateApp', key): + app.replace_state(MainScreen()) + def on_event(self, app: 'StateApp', event): - pass + if event.type == pygame.MOUSEBUTTONUP: + app.replace_state(MainScreen()) def on_render(self, app: 'StateApp'): app.screen.blit(self.background, (0, 0)) |