X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;f=tabakrolletjie%2Fscenes%2Fday.py;h=fc0ee9be5f098be41a63ad5a924c1ec544e9a502;hb=0183ccdfe81d661a768895326d45cb77b1c90fa6;hp=9d410c2a1172abba7e1c568eb4a52418eb887215;hpb=0ec83ab8cb7e31363fb994a282911156579dc514;p=tabakrolletjie.git diff --git a/tabakrolletjie/scenes/day.py b/tabakrolletjie/scenes/day.py index 9d410c2..fc0ee9b 100644 --- a/tabakrolletjie/scenes/day.py +++ b/tabakrolletjie/scenes/day.py @@ -39,11 +39,11 @@ class DayScene(BaseScene): light.render_fittings(surface) def left_click(self, surfpos): - print "LEFT" pos = pymunk.pygame_util.from_pygame( surfpos, pygame.display.get_surface()) - print surfpos, pos - print self._space.point_query(pos, 1.0, CLICK_FILTER) + point_info = self._space.point_query_nearest(pos, 1.0, CLICK_FILTER) + if point_info is not None: + point_info.shape.body.light.toggle() def right_click(self, pos): pass