Welcome
Installation
Getting Started
User Interaction
Build a Game #1
Build a Game #2
Build a Game #3
Colours
Coordinates
API Reference
Globals
Window
Camera
Mouse
Key
Rect
Image
Text
Shape
Line
Screen
Sound
Base
Mouse
The mouse handles cursor input.
__init__(x = auto, y = auto)
Call the mouse initialiser. Use this to reset its position.
x: floatThe x position of the mouse
y: floatThe y position of the mouse
x: float
The x position of the mouse.
y: float
The y position of the mouse.
pos, position: float, float
The position of the mouse.
x: floatThe mouse x position
y: floatThe mouse y position
move: float, float
The movement of the mouse since the last frame. This attribute can also be interpreted as a bool, which you can use it to detect when the mouse moves.
x: floatThe mouse x movement
y: floatThe mouse y movement
press: bool
A mouse button was pressed.
release: bool
A mouse button was released.
left, middle, right, x1, x2: object
Get the state of the corresponding mouse button.
press: boolThe mouse button was pressed
release: boolThe mouse button was released
down: boolThe mouse button is held down