Mercurial > rinkhals
diff gamelib/gameboard.py @ 451:d0f586647dfa
Redraw counters when changing toolbars
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Sat, 21 Nov 2009 20:20:59 +0000 |
parents | 938498b8cd03 |
children | 17e07b4cdeb4 |
line wrap: on
line diff
--- a/gamelib/gameboard.py Sat Nov 21 20:11:40 2009 +0000 +++ b/gamelib/gameboard.py Sat Nov 21 20:20:59 2009 +0000 @@ -117,6 +117,14 @@ td.add(new_toolbar, 0, 0) self.toolbar = new_toolbar self.toolbar.rect.size = self.toolbar.resize() + self.toolbar.update_egg_counter(self.eggs) + self.toolbar.update_day_counter("%s/%s" % (self.days, + self.level.get_max_turns())) + self.toolbar.update_chicken_counter(len(self.chickens)) + self.toolbar.update_cash_counter(self.cash) + self.toolbar.update_wood_counter(self.wood) + if self.killed_foxes: + self.toolbar.update_fox_counter(self.killed_foxes) td.repaint() def update(self):