GUI Events#

class arcade.gui.UIEvent(source: Any)[source]#

Bases:

An event created by the GUI system. Can be passed using widget.dispatch(“on_event”, event). An event always has a source, which is the UIManager for general input events, but will be the specific widget in case of events like on_click events.

source: Any#
class arcade.gui.UIKeyEvent(source: Any, symbol: int, modifiers: int)[source]#

Bases: UIEvent

Covers all keyboard event.

modifiers: int#
symbol: int#
class arcade.gui.UIKeyPressEvent(source: Any, symbol: int, modifiers: int)[source]#

Bases: UIKeyEvent

Triggered when a key is pressed.

modifiers: int#
source: Any#
symbol: int#
class arcade.gui.UIKeyReleaseEvent(source: Any, symbol: int, modifiers: int)[source]#

Bases: UIKeyEvent

Triggered when a key is released.

modifiers: int#
source: Any#
symbol: int#
class arcade.gui.UIMouseDragEvent(source: Any, x: int, y: int, dx: int, dy: int, buttons: int, modifiers: int)[source]#

Bases: UIMouseEvent

Triggered when the mouse moves while one of its buttons being pressed.

buttons: int#
dx: int#
dy: int#
modifiers: int#
class arcade.gui.UIMouseEvent(source: Any, x: int, y: int)[source]#

Bases: UIEvent

Covers all mouse event

pos#
x: int#
y: int#
class arcade.gui.UIMouseMovementEvent(source: Any, x: int, y: int, dx: int, dy: int)[source]#

Bases: UIMouseEvent

Triggered when the mouse is moved.

dx: int#
dy: int#
class arcade.gui.UIMousePressEvent(source: Any, x: int, y: int, button: int, modifiers: int)[source]#

Bases: UIMouseEvent

Triggered when a mouse button(left, right, middle) is pressed.

button: int#
modifiers: int#
class arcade.gui.UIMouseReleaseEvent(source: Any, x: int, y: int, button: int, modifiers: int)[source]#

Bases: UIMouseEvent

Triggered when a mouse button is released.

button: int#
modifiers: int#
class arcade.gui.UIMouseScrollEvent(source: Any, x: int, y: int, scroll_x: int, scroll_y: int)[source]#

Bases: UIMouseEvent

Triggered by rotating the scroll wheel on the mouse.

scroll_x: int#
scroll_y: int#
class arcade.gui.UIOnActionEvent(source: Any, action: Any)[source]#

Bases: UIEvent

Notification about an action

Parameters:

action – Value describing the action, mostly a string

action: Any#
class arcade.gui.UIOnChangeEvent(source: Any, old_value: Any, new_value: Any)[source]#

Bases: UIEvent

Value of a widget changed

new_value: Any#
old_value: Any#
class arcade.gui.UIOnClickEvent(source: Any, x: int, y: int)[source]#

Bases: UIMouseEvent

Triggered when a button is clicked.

source: Any#
x: int#
y: int#
class arcade.gui.UIOnUpdateEvent(source: Any, dt: int)[source]#

Bases: UIEvent

Arcade on_update callback passed as UIEvent

dt: int#
class arcade.gui.UITextEvent(source: Any, text: str)[source]#

Bases: UIEvent

Covers all the text cursor event.

text: str#
class arcade.gui.UITextMotionEvent(source: Any, motion: Any)[source]#

Bases: UIEvent

Triggered when text cursor moves.

motion: Any#
class arcade.gui.UITextMotionSelectEvent(source: Any, selection: Any)[source]#

Bases: UIEvent

Triggered when the text cursor moves selecting the text with it.

selection: Any#