Rename menu items
authorNeil <neil@dip.sun.ac.za>
Sat, 10 Sep 2016 20:24:17 +0000 (22:24 +0200)
committerNeil <neil@dip.sun.ac.za>
Sat, 10 Sep 2016 20:36:33 +0000 (22:36 +0200)
tabakrolletjie/scenes/menu.py

index dcad16b3d27057898a2f80e6d448b6b06ce24d38..7f671026b193bae591ec75a3cddc59d9ba36dde4 100644 (file)
@@ -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