immersive-home/docs/reference/lib--globals--event_system.md
2024-03-17 00:14:31 +01:00

9.2 KiB

EventSystem

Inherits: Node

Properties

Name Type Default
_active_node Node null
_slow_tick float 0.0

Methods

Returns Name
Variant _bubble_call ( type: String, target: Variant, event: EventBubble, focused: Variant )
Variant _handle_focus ( target: Variant, event: EventBubble )
void _physics_process ( delta: Variant )
void _root_call ( type: String, event: Event )
void emit ( type: String, event: Event )
Variant is_focused ( node: Node )
void notify ( message: String, type: int )

Signals

on_action_down (event: EventAction )

Emitted when a button on the controller is pressed

on_action_up (event: EventAction )

Emitted when a button on the controller is released

on_action_value (event: EventAction )

Emitted when a value changes on the controller (e.g. joystick)

on_click (event: EventPointer )

Emitted when a node is clicked

on_focus_in (event: EventFocus )

Emitted when the node gains focus

on_focus_out (event: EventFocus )

Emitted when the node loses focus

on_grab_down (event: EventPointer )

Emitted when a node is grabbed

on_grab_move (event: EventPointer )

Emitted when a node is moved while grabbed

on_grab_up (event: EventPointer )

Emitted when a node is released from being grabbed

on_key_down (event: EventKey )

Emitted when a key on the virtual keyboard is pressed

on_key_up (event: EventKey )

Emitted when a key on the virtual keyboard is released

on_notify (event: EventNotify )

Emitted when a message is sent to the user

on_press_down (event: EventPointer )

Emitted when a node is pressed down

on_press_move (event: EventPointer )

Emitted when a node is moved while pressed

on_press_up (event: EventPointer )

Emitted when a node is released

on_ray_enter (event: EventPointer )

Emitted when a node is hovered

on_ray_leave (event: EventPointer )

Emitted when a node is no longer hovered

on_slow_tick (delta: float )

Emitted when the slow tick event occurs

on_touch_enter (event: EventTouch )

Emitted when a finger enters a TouchArea

on_touch_leave (event: EventTouch )

Emitted when a finger leaves a TouchArea

on_touch_move (event: EventTouch )

Emitted when a finger moves inside a TouchArea

Constants

FN_PREFIX = "_on_"

Prefix for the function names to be called

SIGNAL_PREFIX = "on_"

Prefix for the signal names to be emitted

SLOW_TICK = 0.1

Tick rate for the slow tick event

Property Descriptions

_active_node: Node

No description provided yet.

_slow_tick: float

No description provided yet.

Method Descriptions

_bubble_call (type: String , target: Variant , event: EventBubble , focused: Variant ) -> Variant

No description provided yet.

_handle_focus (target: Variant , event: EventBubble ) -> Variant

No description provided yet.

_physics_process (delta: Variant ) -> void

No description provided yet.

_root_call (type: String , event: Event ) -> void

No description provided yet.

emit (type: String , event: Event ) -> void

Emits an event to the node tree

is_focused (node: Node ) -> Variant

Returns true when the node is focused

notify (message: String , type: int ) -> void

Shortcut for sending a notification