Mercurial > rinkhals
comparison gamelib/gameboard.py @ 514:55b95bb25ced
On move, revert to the select tool - why would you want to move the same chicken twice?
Ctrl-click allows moving current selected chickens without having to use the move tool - saves switching modes repeatedly when rearranging chickens
author | David Fraser <davidf@sjsoft.com> |
---|---|
date | Fri, 27 Nov 2009 10:06:28 +0000 |
parents | b112bcf4d435 |
children | 4166a0051bb6 |
comparison
equal
deleted
inserted
replaced
513:399bb3cb4761 | 514:55b95bb25ced |
---|---|
349 self.sell_chicken(self.tv.screen_to_tile(e.pos)) | 349 self.sell_chicken(self.tv.screen_to_tile(e.pos)) |
350 elif self.selected_tool == constants.TOOL_SELL_EGG: | 350 elif self.selected_tool == constants.TOOL_SELL_EGG: |
351 self.sell_egg(self.tv.screen_to_tile(e.pos)) | 351 self.sell_egg(self.tv.screen_to_tile(e.pos)) |
352 elif self.selected_tool == constants.TOOL_PLACE_ANIMALS: | 352 elif self.selected_tool == constants.TOOL_PLACE_ANIMALS: |
353 self.place_animal(self.tv.screen_to_tile(e.pos)) | 353 self.place_animal(self.tv.screen_to_tile(e.pos)) |
354 self.selected_tool = constants.TOOL_SELECT_CHICKENS | |
355 self.toolbar.toggle_select_on() | |
354 elif self.selected_tool == constants.TOOL_SELECT_CHICKENS: | 356 elif self.selected_tool == constants.TOOL_SELECT_CHICKENS: |
355 if not (mods & KMOD_SHIFT): | 357 # ctrl moves current selection without having to select move tool |
356 self.unselect_all() | 358 if (mods & KMOD_CTRL): |
357 self.select_chicken(self.tv.screen_to_tile(e.pos)) | 359 self.place_animal(self.tv.screen_to_tile(e.pos)) |
360 else: | |
361 if not (mods & KMOD_SHIFT): | |
362 self.unselect_all() | |
363 self.select_chicken(self.tv.screen_to_tile(e.pos)) | |
358 elif self.selected_tool == constants.TOOL_SELL_BUILDING: | 364 elif self.selected_tool == constants.TOOL_SELL_BUILDING: |
359 self.sell_building(self.tv.screen_to_tile(e.pos)) | 365 self.sell_building(self.tv.screen_to_tile(e.pos)) |
360 elif self.selected_tool == constants.TOOL_SELL_EQUIPMENT: | 366 elif self.selected_tool == constants.TOOL_SELL_EQUIPMENT: |
361 self.sell_equipment(self.tv.screen_to_tile(e.pos)) | 367 self.sell_equipment(self.tv.screen_to_tile(e.pos)) |
362 elif self.selected_tool == constants.TOOL_REPAIR_BUILDING: | 368 elif self.selected_tool == constants.TOOL_REPAIR_BUILDING: |