Librocket API Event: Difference between revisions

MjnMixael (talk | contribs)
Created page with "{{Librocket_API}} When an event is sent to Lua, three global variables are set up in the context of the called function. *event - The event object *document - The document in..."
 
MjnMixael (talk | contribs)
Replaced content with "{{SCPUI moved|https://github.com/MjnMixael/SCPUI/wiki/Librocket-API-Event}}"
Tag: Replaced
 
Line 1: Line 1:
{{Librocket_API}}
{{SCPUI moved|https://github.com/MjnMixael/SCPUI/wiki/Librocket-API-Event}}
When an event is sent to Lua, three global variables are set up in the context of the called function.
*event - The event object
*document - The document in which the event fired
*self - The element context in which the event fired
 
==Event Interface==
===Properties===
{| border=1 cellpadding=4 style="border-collapse: collapse"
|-
| Python property
| Brief description
| Equivalent method
|-
| current_element
| The current element in the event propagation.
| GetCurrentElement()
|-
| target_element
| The element the event was originally targeted at.
| GetTargetElement()
|-
| type
| The type of the event.
| GetType()
|-
| parameters
| Dictionary style container of all the parameters in the event
| GetParameters()
|}
===Methods===
Events have a single Python method, StopPropagation(), which interrupts the event propagation if allowed by the event (ie, if it is interruptible).

Latest revision as of 18:31, 28 October 2026

This page has moved. SCPUI documentation now lives on the SCPUI GitHub wiki.
See the new version of this page. The old content is still available in this page's history.