comparison pyntnclick/endscreen.py @ 548:ded4324b236e pyntnclick

Moved stuff around, broke everything.
author Jeremy Thurgood <firxen@gmail.com>
date Sat, 11 Feb 2012 13:10:18 +0200
parents gamelib/endscreen.py@fe51223e0c8d
children 38fb04728ac5
comparison
equal deleted inserted replaced
547:33ce7ff757c3 548:ded4324b236e
1 # endscreen.py
2 # Copyright Boomslang team, 2010 (see COPYING File)
3 # Victory screen for the game
4
5 from albow.screen import Screen
6 from albow.resource import get_image
7
8 from gamelib.widgets import BoomImageButton
9
10
11 class EndImageButton(BoomImageButton):
12
13 FOLDER = 'won'
14
15
16 class EndScreen(Screen):
17 def __init__(self, shell):
18 Screen.__init__(self, shell)
19 self.background = get_image('won', 'won.png')
20 self._menu_button = EndImageButton('menu.png', 26, 500,
21 action=self.main_menu)
22 self._quit_button = EndImageButton('quit.png', 250, 500,
23 action=shell.quit)
24 self.add(self._menu_button)
25 self.add(self._quit_button)
26
27 def draw(self, surface):
28 surface.blit(self.background, (0, 0))
29 self._menu_button.draw(surface)
30 self._quit_button.draw(surface)
31
32 def main_menu(self):
33 self.shell.show_screen(self.shell.menu_screen)