Mercurial > pyntnclick
view gamelib/gamescreen.py @ 25:f9e697e0c6ba
Don't initialise the entire pygame
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Sun, 22 Aug 2010 18:14:05 +0200 |
parents | 9d5de13e2ac3 |
children | 0a68d137f509 |
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 GameScreen(Screen): def __init__(self, shell): Screen.__init__(self, shell) self.shell = shell StartButton = Button('Main Menu', action = self.main_menu) 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 main_menu(self): print 'Returning to menu' self.shell.show_screen(self.shell.menu_screen)