Mercurial > rinkhals
diff gamelib/mainmenu.py @ 179:e2b5262c2b11
Add basic help screen
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Fri, 04 Sep 2009 15:00:54 +0000 |
parents | 082868bea873 |
children | bf1df0902883 |
line wrap: on
line diff
--- a/gamelib/mainmenu.py Fri Sep 04 07:19:58 2009 +0000 +++ b/gamelib/mainmenu.py Fri Sep 04 15:00:54 2009 +0000 @@ -35,12 +35,18 @@ def start_pressed(): pygame.event.post(engine.START_DAY) + def help_pressed(): + pygame.event.post(engine.GO_HELP_SCREEN) + start_button = gui.Button("Start") start_button.connect(gui.CLICK, start_pressed) quit_button = gui.Button("Quit") quit_button.connect(gui.CLICK, quit_pressed) + help_button = gui.Button("Instructions") + help_button.connect(gui.CLICK, help_pressed) + fullscreen_toggle = gui.Button("Toggle Fullscreen") fullscreen_toggle.connect(gui.CLICK, fullscreen_toggled) @@ -56,6 +62,9 @@ self.td(start_button, **td_kwargs) self.tr() + self.td(help_button, **td_kwargs) + + self.tr() self.td(fullscreen_toggle, **td_kwargs) self.tr()