Mercurial > pyntnclick
diff gamelib/endscreen.py @ 443:3dab4984cbd7
Redo way of reaching end screen
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Sun, 29 Aug 2010 00:24:40 +0200 |
parents | |
children | ece69836f00a |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gamelib/endscreen.py Sun Aug 29 00:24:40 2010 +0200 @@ -0,0 +1,29 @@ +# endscreen.py +# Copyright Boomslang team, 2010 (see COPYING File) +# Victory screen for the game + +from albow.screen import Screen +from albow.controls import Button +from albow.resource import get_image +from albow.layout import Column + + +class EndScreen(Screen): + def __init__(self, shell): + Screen.__init__(self, shell) + self.background = get_image('won', 'won.png') + StartButton = Button('Main Menu', action = self.main_menu) + QuitButton = Button('Quit', action = shell.quit) + self.add(StartButton) + StartButton.rect.bottomleft = (50, 550) + self.add(QuitButton) + QuitButton.rect.bottomleft = (250, 550) + + def draw(self, surface): + surface.blit(self.background, (0,0)) + super(EndScreen, self).draw(surface) + + def main_menu(self): + self.shell.show_screen(self.shell.menu_screen) + +