Mercurial > rinkhals
comparison gamelib/gameover.py @ 159:7bb8d9d6858a
Darken center of game over splash screen to make text legible.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Thu, 03 Sep 2009 22:00:28 +0000 |
parents | e3572b907028 |
children | 96d440bebdaa |
comparison
equal
deleted
inserted
replaced
158:baf857805867 | 159:7bb8d9d6858a |
---|---|
15 class GameOverContainer(gui.Container): | 15 class GameOverContainer(gui.Container): |
16 def __init__(self, game_over, *args, **kwargs): | 16 def __init__(self, game_over, *args, **kwargs): |
17 gui.Container.__init__(self, *args, **kwargs) | 17 gui.Container.__init__(self, *args, **kwargs) |
18 self.add(game_over, 0, 0) | 18 self.add(game_over, 0, 0) |
19 if game_over.survived: | 19 if game_over.survived: |
20 self.splash = imagecache.load_image("images/gameover_win.png") | 20 self.splash = imagecache.load_image("images/gameover_win.png", ["darken_center"]) |
21 else: | 21 else: |
22 self.splash = imagecache.load_image("images/gameover_lose.png") | 22 self.splash = imagecache.load_image("images/gameover_lose.png", ["darken_center"]) |
23 | 23 |
24 def paint(self, s): | 24 def paint(self, s): |
25 pygame.display.set_caption('Game Over') | 25 pygame.display.set_caption('Game Over') |
26 pygame.display.get_surface().blit(self.splash, (0, 0)) | 26 pygame.display.get_surface().blit(self.splash, (0, 0)) |
27 gui.Container.paint(self, s) | 27 gui.Container.paint(self, s) |