comparison gamelib/gameboard.py @ 478:6974048bf04a

middle-click deselects chickens but not the tool.
author Adrianna Pińska <adrianna.pinska@gmail.com>
date Wed, 25 Nov 2009 18:45:20 +0000
parents 3dae0fc14009
children 1689b43ed8be
comparison
equal deleted inserted replaced
477:c1439f6705a2 478:6974048bf04a
268 if not self.day: 268 if not self.day:
269 return 269 return
270 if e.button == 3: # Right button 270 if e.button == 3: # Right button
271 self.set_selected_tool(None, None) 271 self.set_selected_tool(None, None)
272 self.toolbar.clear_tool() 272 self.toolbar.clear_tool()
273 elif e.button == 2: # Middle button
274 self.unselect_all()
273 elif e.button != 1: # Left button 275 elif e.button != 1: # Left button
274 return 276 return
275 if self.selected_tool == constants.TOOL_SELL_CHICKEN: 277 if self.selected_tool == constants.TOOL_SELL_CHICKEN:
276 self.sell_chicken(self.tv.screen_to_tile(e.pos)) 278 self.sell_chicken(self.tv.screen_to_tile(e.pos))
277 elif self.selected_tool == constants.TOOL_SELL_EGG: 279 elif self.selected_tool == constants.TOOL_SELL_EGG: