Skip to content

Scene Mouse Events

MouseEvent

MouseEvent(engine: Engine)

Bases: SceneEvent, CancellableEvent

Base mouse event implementation.

engine property

engine: Engine

The engine that is handling this plugin and dispatched this event.

is_cancelled property

is_cancelled: bool

Check if this event has already been cancelled.

scene property

scene: Scene

The active scene that dispatched this event.

cancel

cancel() -> None

Cancel this event from being further handled.

MouseMoveEvent

MouseMoveEvent(engine: Engine)

Bases: MouseEvent

Dispatched when the scene recognizes that the mouse has moved.

relative property

relative: IntVector2

The amount of pixels the mouse has moved.

engine property

engine: Engine

The engine that is handling this plugin and dispatched this event.

is_cancelled property

is_cancelled: bool

Check if this event has already been cancelled.

scene property

scene: Scene

The active scene that dispatched this event.

cancel

cancel() -> None

Cancel this event from being further handled.

MousePressedEvent

MousePressedEvent(engine: Engine)

Bases: MouseEvent

Dispatched when the scene recognizes that a button on the mouse has been pressed.

button property

button: int

The ID of the button pressed.

engine property

engine: Engine

The engine that is handling this plugin and dispatched this event.

is_cancelled property

is_cancelled: bool

Check if this event has already been cancelled.

scene property

scene: Scene

The active scene that dispatched this event.

cancel

cancel() -> None

Cancel this event from being further handled.

MouseReleasedEvent

MouseReleasedEvent(engine: Engine)

Bases: MouseEvent

Dispatched when the scene recognizes that a button on the mouse has been released.

button property

button: int

The ID of the button released.

engine property

engine: Engine

The engine that is handling this plugin and dispatched this event.

is_cancelled property

is_cancelled: bool

Check if this event has already been cancelled.

scene property

scene: Scene

The active scene that dispatched this event.

cancel

cancel() -> None

Cancel this event from being further handled.

MouseWheelScrollEvent

MouseWheelScrollEvent(engine: Engine)

Bases: MouseEvent

Dispatched when the scene recognizes that the scroll wheel on the mouse has moved.

amount property

amount: int

The amount the scroll wheel has moved - Positive if up, negative if down.

engine property

engine: Engine

The engine that is handling this plugin and dispatched this event.

is_cancelled property

is_cancelled: bool

Check if this event has already been cancelled.

scene property

scene: Scene

The active scene that dispatched this event.

cancel

cancel() -> None

Cancel this event from being further handled.