Mercurial > rinkhals
comparison gamelib/gameboard.py @ 275:678be1afc307
Fix minor bug in clearing of tool state on right-click.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Sat, 05 Sep 2009 14:15:35 +0000 |
parents | cade64404997 |
children | f6bd57494e81 |
comparison
equal
deleted
inserted
replaced
274:bee12aed1f68 | 275:678be1afc307 |
---|---|
336 | 336 |
337 def use_tool(self, e): | 337 def use_tool(self, e): |
338 if not self.day: | 338 if not self.day: |
339 return | 339 return |
340 if e.button == 3: # Right button | 340 if e.button == 3: # Right button |
341 self.selected_tool = None | 341 self.set_selected_tool(None, None) |
342 self.set_cursor() | 342 self.toolbar.clear_tool() |
343 elif e.button != 1: # Left button | 343 elif e.button != 1: # Left button |
344 return | 344 return |
345 if self.selected_tool == constants.TOOL_SELL_CHICKEN: | 345 if self.selected_tool == constants.TOOL_SELL_CHICKEN: |
346 self.sell_chicken(self.tv.screen_to_tile(e.pos)) | 346 self.sell_chicken(self.tv.screen_to_tile(e.pos)) |
347 elif self.selected_tool == constants.TOOL_SELL_EGG: | 347 elif self.selected_tool == constants.TOOL_SELL_EGG: |