Move menu items closer.
authorSimon Cross <hodgestar@gmail.com>
Fri, 16 May 2014 22:47:12 +0000 (00:47 +0200)
committerSimon Cross <hodgestar@gmail.com>
Fri, 16 May 2014 22:47:12 +0000 (00:47 +0200)
naja/scenes/menu.py

index cd3da6314869e9e8d12d0d3410d4d3c9c2154f83..da009a994acdcd1104bbeb23cb613338d5053d76 100644 (file)
@@ -28,10 +28,10 @@ class MenuScene(Scene):
 
         selector = SelectorWidget()
         self.add(selector)
-        y_offset = 200
-        x_offset = 300
+        y_offset, y_diff = 260, 40
+        x_offset = 320
 
-        y_offset += 50
+        y_offset += y_diff
         resume = TextWidget(
             (x_offset, y_offset), 'Resume Game', colour=PALETTE.WHITE,
             unselectable_colour=PALETTE.GREY)
@@ -39,18 +39,18 @@ class MenuScene(Scene):
         resume.set_selectable_callback(lambda: state is not None)
         selector.add(resume)
 
-        y_offset += 50
+        y_offset += y_diff
         new = TextWidget(
             (x_offset, y_offset), 'New Game', colour=PALETTE.WHITE)
         new.add_callback('click', self.scene_callback(NewGameScene))
         selector.add(new)
 
-        y_offset += 50
+        y_offset += y_diff
         load = TextWidget((x_offset, y_offset), 'Load', colour=PALETTE.WHITE)
         load.add_callback('click', self.scene_callback(LoadGameScene))
         selector.add(load)
 
-        y_offset += 50
+        y_offset += y_diff
         save = TextWidget(
             (x_offset, y_offset), 'Save', colour=PALETTE.WHITE,
             unselectable_colour=PALETTE.GREY)
@@ -58,19 +58,19 @@ class MenuScene(Scene):
         save.set_selectable_callback(lambda: state is not None)
         selector.add(save)
 
-        y_offset += 50
+        y_offset += y_diff
         howto = TextWidget(
             (x_offset, y_offset), 'How To Play', colour=PALETTE.WHITE)
         howto.add_callback('click', self.scene_callback(HowtoScene))
         selector.add(howto)
 
-        y_offset += 50
+        y_offset += y_diff
         credits = TextWidget(
             (x_offset, y_offset), 'Credits', colour=PALETTE.WHITE)
         credits.add_callback('click', self.scene_callback(CreditsScene))
         selector.add(credits)
 
-        y_offset += 50
+        y_offset += y_diff
         quit = TextWidget((x_offset, y_offset), 'Quit', colour=PALETTE.WHITE)
         quit.add_callback('click', lambda event: QuitGameEvent.post())
         selector.add(quit)