comparison gamelib/gameboard.py @ 165:c7d496556475

Minor cursor bugfixes
author Neil Muller <drnlmuller@gmail.com>
date Thu, 03 Sep 2009 22:35:22 +0000
parents ab90040013a7
children 4aa800354b7c
comparison
equal deleted inserted replaced
164:ab90040013a7 165:c7d496556475
261 """ 261 """
262 chicken = self.get_chicken(tile_pos) 262 chicken = self.get_chicken(tile_pos)
263 if chicken: 263 if chicken:
264 if chicken is self.animal_to_place: 264 if chicken is self.animal_to_place:
265 self.animal_to_place = None 265 self.animal_to_place = None
266 pygame.mouse.set_cursor(*cursors.cursors['arrow']) 266 pygame.mouse.set_cursor(*cursors.cursors['select'])
267 else: 267 else:
268 self.animal_to_place = chicken 268 self.animal_to_place = chicken
269 pygame.mouse.set_cursor(*cursors.cursors['chicken']) 269 pygame.mouse.set_cursor(*cursors.cursors['chicken'])
270 return 270 return
271 building = self.get_building(tile_pos) 271 building = self.get_building(tile_pos)
310 def open_building_dialog(self, building): 310 def open_building_dialog(self, building):
311 """Create dialog for manipulating the contents of a building.""" 311 """Create dialog for manipulating the contents of a building."""
312 def select_occupant(place, button): 312 def select_occupant(place, button):
313 """Select occupant in place.""" 313 """Select occupant in place."""
314 self.animal_to_place = place.occupant 314 self.animal_to_place = place.occupant
315 pygame.mouse.set_cursor(*cursors.cursor['chicken']) 315 pygame.mouse.set_cursor(*cursors.cursors['chicken'])
316 316
317 def set_occupant(place, button): 317 def set_occupant(place, button):
318 """Set occupant of a given place.""" 318 """Set occupant of a given place."""
319 if self.animal_to_place is not None: 319 if self.animal_to_place is not None:
320 button.value = icons.CHKN_NEST_ICON 320 button.value = icons.CHKN_NEST_ICON