def _Keyboard_Event(self, key, down=True):
"""
Internal keyboard event, don't override this.
Checks for the initial keydown of the basic testbed keys. Passes the
unused ones onto the test via the Keyboard() function.
"""
if down:
if key == pygame.K_z: # Zoom in
self.viewZoom = min(2 * self.viewZoom, 500.0)
elif key == pygame.K_x: # Zoom out
self.viewZoom = max(0.9 * self.viewZoom, 0.02)
评论列表
文章目录