UiEvent¶
Extends EngineObject.
An event that reached a listener (UiElement.Listen). It is only good inside the handler: afterwards its calls do nothing.
Properties¶
target: UiElement?The element the event is about (the one that was hit, or that has the focus). Read-only.current: UiElement?The element whose listener is running. Read-only.phase: number1 going down (capture), 2 at the target, 4 going up. Read-only.
Methods¶
stop_propagation¶
function stop_propagation(self): ()
Keeps the event from reaching the elements above (or, in the capture phase, below) this one.
has¶
function has(self, key: string): boolean
get_string¶
function get_string(self, key: string): string?
A parameter as text (value of a change), or nothing.
get_number¶
function get_number(self, key: string, fallback: number?): number
A parameter as a number (mouse_x, key_identifier, wheel_delta_y), or fallback.