17
|
1 # menu.py
|
|
2 # Copyright Boomslang team, 2010 (see COPYING File)
|
|
3 # Main menu for the game
|
|
4
|
|
5 from albow.screen import Screen
|
|
6 from albow.controls import Button, Label
|
|
7 from albow.layout import Column
|
|
8
|
|
9 class MenuScreen(Screen):
|
19
|
10 def __init__(self, shell):
|
|
11 Screen.__init__(self, shell)
|
|
12 StartButton = Button('Start New Game', action = self.start)
|
|
13 QuitButton = Button('Quit', action = shell.quit)
|
|
14 Title = Label('Caught! ... In SPAACE')
|
|
15 menu = Column([
|
|
16 Title,
|
|
17 StartButton,
|
|
18 QuitButton,
|
|
19 ], align='l', spacing=20)
|
|
20 self.add_centered(menu)
|
17
|
21
|
19
|
22 def start(self):
|
|
23 print 'Starting the game'
|
17
|
24
|
|
25
|