Mercurial > rinkhals
changeset 292:bf271e857157
Clear tool when calling price dialog
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Sat, 05 Sep 2009 16:14:23 +0000 |
parents | 3e994b3f750d |
children | 78c49d87e175 |
files | gamelib/gameboard.py |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/gamelib/gameboard.py Sat Sep 05 16:12:22 2009 +0000 +++ b/gamelib/gameboard.py Sat Sep 05 16:14:23 2009 +0000 @@ -117,6 +117,8 @@ self.add_tool("Finished Day", self.day_done) + self.anim_clear_tool = False # Flag to clear the tool on an anim loop + def day_done(self): import engine pygame.event.post(engine.START_NIGHT) @@ -175,6 +177,7 @@ dialog = gui.Dialog(gui.Label('Price Reference'), tbl) close_button.connect(gui.CLICK, dialog.close) dialog.open() + self.anim_clear_tool = True update_cash_counter = mkcountupdate('cash_counter') update_fox_counter = mkcountupdate('killed_foxes') @@ -209,6 +212,7 @@ self.group.value = None for item in self.group.widgets: item.pcls = "" + self.anim_clear_tool = False def add_counter(self, icon, label): self.tr() @@ -784,6 +788,8 @@ def run_animations(self): for anim in self.animations: anim.animate() + if self.toolbar.anim_clear_tool: + self.toolbar.clear_tool() def move_foxes(self): """Move the foxes.