Parses mouse input
(self)
| 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""" |