Mercurial > rinkhals
comparison 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 |
comparison
equal
deleted
inserted
replaced
450:5d74d0e4a4cc | 451:d0f586647dfa |
---|---|
115 td = self.toolbar.container | 115 td = self.toolbar.container |
116 td.remove(self.toolbar) | 116 td.remove(self.toolbar) |
117 td.add(new_toolbar, 0, 0) | 117 td.add(new_toolbar, 0, 0) |
118 self.toolbar = new_toolbar | 118 self.toolbar = new_toolbar |
119 self.toolbar.rect.size = self.toolbar.resize() | 119 self.toolbar.rect.size = self.toolbar.resize() |
120 self.toolbar.update_egg_counter(self.eggs) | |
121 self.toolbar.update_day_counter("%s/%s" % (self.days, | |
122 self.level.get_max_turns())) | |
123 self.toolbar.update_chicken_counter(len(self.chickens)) | |
124 self.toolbar.update_cash_counter(self.cash) | |
125 self.toolbar.update_wood_counter(self.wood) | |
126 if self.killed_foxes: | |
127 self.toolbar.update_fox_counter(self.killed_foxes) | |
120 td.repaint() | 128 td.repaint() |
121 | 129 |
122 def update(self): | 130 def update(self): |
123 self.tvw.reupdate() | 131 self.tvw.reupdate() |
124 | 132 |