def button_released(self, event, scene): screen_position = Vector(*event.pos) camera = scene.main_camera scene_position = camera.translate_to_frame(screen_position) btn = self.button_map.get(event.button) if btn is not None: return events.ButtonReleased( button=btn, position=scene_position, # TODO: Add frame position )
def button_released(self, event, scene): button = event.button screen_position = Vector(button.x, button.y) camera = scene.main_camera scene_position = camera.translate_point_to_game_space(screen_position) btn = self.button_map.get(button.button) if btn is not None: return events.ButtonReleased( button=btn, position=scene_position, # timestamp=motion.timestamp )