Mercurial > rinkhals
diff gamelib/gameover.py @ 151:082868bea873
Refactor UI so that only a single gui.App is used. Pass all UI events via main_app. Change Toolbar table to use .td() everywhere. Move toolbar to top.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Thu, 03 Sep 2009 20:32:56 +0000 |
parents | 1d73de63bd71 |
children | e3572b907028 |
line wrap: on
line diff
--- a/gamelib/gameover.py Thu Sep 03 20:24:37 2009 +0000 +++ b/gamelib/gameover.py Thu Sep 03 20:32:56 2009 +0000 @@ -7,16 +7,14 @@ import constants import imagecache -def add_game_over(app, gameboard): - """Add the game over menu to the app""" - for widget in app.widgets[:]: - app.remove(widget) +def create_game_over(gameboard): + """Create a game over screen""" game_over = GameOver(gameboard) c = GameOverContainer(align=0, valign=0) c.add(game_over, 0, 0) - app.init(c) + return c class GameOverContainer(gui.Container): def paint(self, s):