Mercurial > rinkhals
diff gamelib/gameboard.py @ 189:37af9e5dd292
Use tool with left button, cancel tool with right button.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Fri, 04 Sep 2009 18:00:59 +0000 |
parents | f06010d34cd3 |
children | 3c80f49d7d74 |
line wrap: on
line diff
--- a/gamelib/gameboard.py Fri Sep 04 17:55:16 2009 +0000 +++ b/gamelib/gameboard.py Fri Sep 04 18:00:59 2009 +0000 @@ -246,6 +246,11 @@ return True def use_tool(self, e): + if e.button == 3: # Right button + self.selected_tool = None + self.reset_cursor() + elif e.button != 1: # Left button + return if self.selected_tool == constants.TOOL_SELL_CHICKEN: self.sell_chicken(self.tv.screen_to_tile(e.pos)) elif self.selected_tool == constants.TOOL_SELL_EGG: