From: Neil Date: Sat, 10 Sep 2016 20:24:17 +0000 (+0200) Subject: Rename menu items X-Git-Tag: tabakrolletjie-v1.0.0~41^2~4 X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=bf0cca2f391ed3e49b09933325b430c33cf59daf;p=tabakrolletjie.git Rename menu items --- diff --git a/tabakrolletjie/scenes/menu.py b/tabakrolletjie/scenes/menu.py index dcad16b..7f67102 100644 --- a/tabakrolletjie/scenes/menu.py +++ b/tabakrolletjie/scenes/menu.py @@ -6,7 +6,7 @@ from .base import BaseScene 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): @@ -18,10 +18,11 @@ 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): @@ -71,11 +72,13 @@ class MenuScene(BaseScene): 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