Mouse
- class quest.contrib.mouse.MouseMotionMixin[source]
Extends quest.QuestGame to allow the player to be controlled by the mouse. Example usage:
from quest.examples.island import IslandAdventure from quest.contrib.mouse import MouseMotionMixin class IslandWithMouse(MouseMotionMixin, IslandAdventure): "The island adventure with mouse control." IslandWithMouse().run()
- on_mouse_motion(x, y, dx, dy)[source]
Keep track of the mouse’s new coordinates whenever it moves. This method is called automatically whenever the mouse moves.
- Parameters
x (float) – x position of mouse
y (float) – y position of mouse
dx (float) – Change in x since the last time this method was called
dy (float) – Change in y since the last time this method was called