From: Simon Cross Date: Fri, 16 May 2014 22:44:31 +0000 (+0200) Subject: Slightly better menu item positions (stop gap while I do something better). X-Git-Tag: 0.1~165 X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=468218cb2f7bda81e38edc7b4777dbb70d6f694a;p=naja.git Slightly better menu item positions (stop gap while I do something better). --- diff --git a/naja/scenes/menu.py b/naja/scenes/menu.py index 750d2ce..cd3da63 100644 --- a/naja/scenes/menu.py +++ b/naja/scenes/menu.py @@ -28,29 +28,31 @@ class MenuScene(Scene): selector = SelectorWidget() self.add(selector) - y_offset = 0 + y_offset = 200 + x_offset = 300 y_offset += 50 resume = TextWidget( - (100, y_offset), 'Resume Game', colour=PALETTE.WHITE, + (x_offset, y_offset), 'Resume Game', colour=PALETTE.WHITE, unselectable_colour=PALETTE.GREY) resume.add_callback('click', self.scene_callback(GameScene)) resume.set_selectable_callback(lambda: state is not None) selector.add(resume) y_offset += 50 - new = TextWidget((100, y_offset), 'New Game', colour=PALETTE.WHITE) + 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 - load = TextWidget((100, y_offset), 'Load', colour=PALETTE.WHITE) + load = TextWidget((x_offset, y_offset), 'Load', colour=PALETTE.WHITE) load.add_callback('click', self.scene_callback(LoadGameScene)) selector.add(load) y_offset += 50 save = TextWidget( - (100, y_offset), 'Save', colour=PALETTE.WHITE, + (x_offset, y_offset), 'Save', colour=PALETTE.WHITE, unselectable_colour=PALETTE.GREY) save.add_callback('click', self.scene_callback(SaveGameScene)) save.set_selectable_callback(lambda: state is not None) @@ -58,17 +60,18 @@ class MenuScene(Scene): y_offset += 50 howto = TextWidget( - (100, y_offset), 'How To Play', colour=PALETTE.WHITE) + (x_offset, y_offset), 'How To Play', colour=PALETTE.WHITE) howto.add_callback('click', self.scene_callback(HowtoScene)) selector.add(howto) y_offset += 50 - credits = TextWidget((100, y_offset), 'Credits', colour=PALETTE.WHITE) + credits = TextWidget( + (x_offset, y_offset), 'Credits', colour=PALETTE.WHITE) credits.add_callback('click', self.scene_callback(CreditsScene)) selector.add(credits) y_offset += 50 - quit = TextWidget((100, y_offset), 'Quit', colour=PALETTE.WHITE) + quit = TextWidget((x_offset, y_offset), 'Quit', colour=PALETTE.WHITE) quit.add_callback('click', lambda event: QuitGameEvent.post()) selector.add(quit)