# HG changeset patch # User Neil Muller # Date 1252167263 0 # Node ID bf271e8571573c90468af8942c64dae27c08234d # Parent 3e994b3f750d758676d2ea80cf642330593b6b8e Clear tool when calling price dialog diff -r 3e994b3f750d -r bf271e857157 gamelib/gameboard.py --- 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.