Mercurial > boomslang
view gamelib/menu.py @ 18:c9b124c2f5c6
Start of scene drawing framework.
author | Simon Cross <hodgestar+bzr@gmail.com> |
---|---|
date | Sun, 22 Aug 2010 17:04:34 +0200 |
parents | 55f1969e41c9 |
children | 87f8a46b88af |
line wrap: on
line source
# menu.py # Copyright Boomslang team, 2010 (see COPYING File) # Main menu for the game from albow.screen import Screen from albow.controls import Button, Label from albow.layout import Column class MenuScreen(Screen): def __init__(self, shell): Screen.__init__(self, shell) self.shell = shell StartButton = Button('Start New Game', action = self.start) QuitButton = Button('Quit', action = shell.quit) Title = Label('Caught! ... In SPAACE') menu = Column([ Title, StartButton, QuitButton, ], align='l', spacing=20) self.add_centered(menu) def start(self): print 'Starting the game'