diff gamelib/menu.py @ 24:9d5de13e2ac3

Add a game screen. So far, the game content looks a *lot* like the main menu.
author Jeremy Thurgood <firxen@gmail.com>
date Sun, 22 Aug 2010 18:09:25 +0200
parents 87f8a46b88af
children e5c043aeed65
line wrap: on
line diff
--- a/gamelib/menu.py	Sun Aug 22 18:07:48 2010 +0200
+++ b/gamelib/menu.py	Sun Aug 22 18:09:25 2010 +0200
@@ -9,7 +9,8 @@
 class MenuScreen(Screen):
     def __init__(self, shell):
         Screen.__init__(self, shell)
-        StartButton  = Button('Start New Game', action = self.start)
+        self.shell = shell
+        StartButton = Button('Start New Game', action = self.start)
         QuitButton = Button('Quit', action = shell.quit)
         Title = Label('Caught! ... In SPAACE')
         menu = Column([
@@ -21,5 +22,6 @@
 
     def start(self):
         print 'Starting the game'
+        self.shell.show_screen(self.shell.game_screen)