from ..events import QuitEvent, SceneChangeEvent
from ..loader import loader
from ..constants import FONTS
-from ..widgets import TextButton
+from ..widgets import TextButton, SpacerButton
class MenuScene(BaseScene):
self._title = font_title.render('A Game with a title', True,
(255, 255, 255))
self._menu = [
- TextButton("Load Level", (255, 255, 255), name='load level'),
- TextButton("Start Game (Day)", (255, 255, 255), name='start game'),
- TextButton("Load Saved Game", (255, 255, 255), name='load game'),
+ TextButton("New Game", (255, 255, 255), name='new game'),
+ TextButton("Continue / Retry", (255, 255, 255), name='continue'),
TextButton("Help", (255, 255, 255), name='help'),
+ SpacerButton((50, 30)),
+ TextButton("Quit", (255, 255, 255), name='quit'),
]
def render(self, surface, gamestate):
self._do_help()
elif ev.type == pgl.MOUSEBUTTONDOWN:
pressed = self._get_pressed(ev)
- if pressed == 'load level':
+ if pressed == 'new game':
self._do_load_level()
- elif pressed == 'start game':
+ elif pressed == 'continue':
self._do_day()
elif pressed == 'help':
self._do_help()
+ elif pressed == 'quit':
+ QuitEvent.post()
elif pressed:
print 'Pressed', pressed