MCPcopy Create free account
hub / github.com/AdaCompNUS/summit / _parse_mouse

Method _parse_mouse

PythonAPI/examples/no_rendering_mode.py:1475–1481  ·  view source on GitHub ↗

Parses mouse input

(self)

Source from the content-addressed store, hash-verified

1473 self.control.hand_brake = keys[K_SPACE]
1474
1475 def _parse_mouse(self):
1476 """Parses mouse input"""
1477 if pygame.mouse.get_pressed()[0]:
1478 x, y = pygame.mouse.get_pos()
1479 self.mouse_offset[0] += (1.0 / self.wheel_offset) * (x - self.mouse_pos[0])
1480 self.mouse_offset[1] += (1.0 / self.wheel_offset) * (y - self.mouse_pos[1])
1481 self.mouse_pos = (x, y)
1482
1483 def parse_input(self, clock):
1484 """Parses the input, which is classified in keyboard events and mouse"""

Callers 1

parse_inputMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected