Centre menu items
authorNeil <neil@dip.sun.ac.za>
Fri, 16 May 2014 23:05:44 +0000 (01:05 +0200)
committerNeil <neil@dip.sun.ac.za>
Fri, 16 May 2014 23:06:11 +0000 (01:06 +0200)
naja/scenes/menu.py

index e5a77a4cb5157fe54e6a1b5495653f1c601a2548..a409b2a8735ac4ebd8441e8307a9eb44a85b42c0 100644 (file)
@@ -29,49 +29,54 @@ class MenuScene(Scene):
         selector = SelectorWidget()
         self.add(selector)
         y_offset, y_diff = 270, 40
-        x_offset = 350
+        x_offset = 400
 
         y_offset += y_diff
         resume = TextWidget(
             (x_offset, y_offset), 'Resume Game', colour=PALETTE.WHITE,
-            unselectable_colour=PALETTE.GREY)
+            unselectable_colour=PALETTE.GREY, centre=True)
         resume.add_callback('click', self.scene_callback(GameScene))
         resume.set_selectable_callback(lambda: state is not None)
         selector.add(resume)
 
         y_offset += y_diff
         new = TextWidget(
-            (x_offset, y_offset), 'New Game', colour=PALETTE.WHITE)
+            (x_offset, y_offset), 'New Game', colour=PALETTE.WHITE,
+            centre=True)
         new.add_callback('click', self.scene_callback(NewGameScene))
         selector.add(new)
 
         y_offset += y_diff
-        load = TextWidget((x_offset, y_offset), 'Load', colour=PALETTE.WHITE)
+        load = TextWidget((x_offset, y_offset), 'Load', colour=PALETTE.WHITE,
+                           centre=True)
         load.add_callback('click', self.scene_callback(LoadGameScene))
         selector.add(load)
 
         y_offset += y_diff
         save = TextWidget(
             (x_offset, y_offset), 'Save', colour=PALETTE.WHITE,
-            unselectable_colour=PALETTE.GREY)
+            unselectable_colour=PALETTE.GREY, centre=True)
         save.add_callback('click', self.scene_callback(SaveGameScene))
         save.set_selectable_callback(lambda: state is not None)
         selector.add(save)
 
         y_offset += y_diff
         howto = TextWidget(
-            (x_offset, y_offset), 'How To Play', colour=PALETTE.WHITE)
+            (x_offset, y_offset), 'How To Play', colour=PALETTE.WHITE,
+            centre=True)
         howto.add_callback('click', self.scene_callback(HowtoScene))
         selector.add(howto)
 
         y_offset += y_diff
         credits = TextWidget(
-            (x_offset, y_offset), 'Credits', colour=PALETTE.WHITE)
+            (x_offset, y_offset), 'Credits', colour=PALETTE.WHITE,
+            centre=True)
         credits.add_callback('click', self.scene_callback(CreditsScene))
         selector.add(credits)
 
         y_offset += y_diff
-        quit = TextWidget((x_offset, y_offset), 'Quit', colour=PALETTE.WHITE)
+        quit = TextWidget((x_offset, y_offset), 'Quit', colour=PALETTE.WHITE,
+                           centre=True)
         quit.add_callback('click', lambda event: QuitGameEvent.post())
         selector.add(quit)