global RmlUi

Global functions for Recoil’s RmlUi implementation.

[source]


methods


RmlUi.CreateContext


function RmlUi.CreateContext(name: string) -> nil RmlUi.Context?

@return nil - if failed.

Create a new context.

[source]

RmlUi.RemoveContext


function RmlUi.RemoveContext(context: (string|RmlUi.Context))

Remove a context.

[source]

RmlUi.LoadFontFace


function RmlUi.LoadFontFace(
  file_path: string,
  fallback: boolean?,
  weight: RmlUi.font_weight?
) -> success boolean

Load a font face.

[source]

RmlUi.GetContext


function RmlUi.GetContext(name: string) -> nil RmlUi.Context?

@return nil - if failed.

Get a context by name.

[source]

RmlUi.RegiserEventType


function RmlUi.RegiserEventType(
  event_type: string,
  interruptible: boolean?,
  bubbles: boolean?,
  default_phase: RmlUi.default_action_phase?
) ->  RmlUi.EventID

Register a new event type.

[source]

RmlUi.AddTranslationString


function RmlUi.AddTranslationString(
  key: string,
  translation: string
) -> success boolean

Add a translation string.

[source]

RmlUi.ClearTranslations


function RmlUi.ClearTranslations()

Clear registered translations.

[source]

RmlUi.SetMouseCursorAlias


function RmlUi.SetMouseCursorAlias(
  rml_name: string,
  recoil_name: string
)

@param rml_name - name used in rml script

@param recoil_name - name used in recoil

Converts the css names for cursors to the Recoil Engine names for cursors like RmlUi.SetMouseCursorAlias("pointer", 'Move'). Web devs tend to want to use specific words for pointer types.

[source]

RmlUi.SetDebugContext


function RmlUi.SetDebugContext(context: (string|RmlUi.Context))

Set which context the debug inspector is meant to inspect.

[source]

fields


RmlUi.Vector2i


RmlUi.Vector2i : RmlUi.Vector2i {
    x: integer,
    y: integer,
    magnitude: number,
}

Two-dimensional integral vector.

[source]

RmlUi.Vector2f


RmlUi.Vector2f : RmlUi.Vector2f {
    x: number,
    y: number,
    magnitude: number,
}

Two-dimensional float vector

[source]

@see float2

RmlUi.EventListener


RmlUi.EventListener : RmlUi.EventListener

Event listener interface

[source]

RmlUi.Element


RmlUi.Element : RmlUi.Element {
    class_name: string,
    id: string,
    inner_rml: string,
    scroll_left: integer,
    scroll_top: integer,
    attributes: RmlUi.ElementAttributesProxy,
    child_nodes: RmlUi.ElementChildNodesProxy,
    client_left: integer,
    client_height: integer,
    client_top: integer,
    client_width: integer,
    first_child: RmlUi.Element?,
    ...
}

Represents an element in the RmlUi document tree. This class cannot be constructed directly; use a Document object to instantiate elements. This is the foundational piece of the DOM.

[source]

RmlUi.RmlEventPhase


RmlUi.RmlEventPhase : RmlUi.RmlEventPhase {
    None: integer,
    Capture: integer,
    Target: integer,
    Bubble: integer,
}

[source]

RmlUi.EventParametersProxy


RmlUi.EventParametersProxy : RmlUi.EventParametersProxy {
    button: RmlUi.EventParametersProxy.MouseButton,
    mouse_x: integer,
    mouse_y: integer,
    scroll_lock_key: RmlUi.EventParametersProxy.TrueFalse,
    meta_key: RmlUi.EventParametersProxy.TrueFalse,
    ctrl_key: RmlUi.EventParametersProxy.TrueFalse,
    shift_key: RmlUi.EventParametersProxy.TrueFalse,
    caps_lock_key: RmlUi.EventParametersProxy.TrueFalse,
    alt_key: RmlUi.EventParametersProxy.TrueFalse,
}

Keyboard and mouse input data associated with an event.

[source]

RmlUi.Event


RmlUi.Event : RmlUi.Event {
    current_element: RmlUi.Element,
    type: string,
    target_element: RmlUi.Element,
    parameters: RmlUi.EventParametersProxy,
    event_phase: RmlUi.RmlEventPhase,
    interruptible: boolean,
    propagating: boolean,
    immediate_propagating: boolean,
}

An event that happens to an element.

[source]

RmlUi.ElementPtr


RmlUi.ElementPtr : RmlUi.ElementPtr

Represents an owned element. This type is mainly used to modify the DOM tree by passing the object into other elements. For example RmlUi.Element:AppendChild(). A current limitation in the Lua plugin is that Element member properties and functions cannot be used directly on this type.

[source]

RmlUi.contexts


RmlUi.contexts : RmlUi.Context[]

[source]

RmlUi.version


RmlUi.version : string

[source] RmlUi version

RmlUi.key_identifier


RmlUi.key_identifier : RmlUi.key_identifier {
    0: integer,
    1: integer,
    2: integer,
    3: integer,
    4: integer,
    5: integer,
    6: integer,
    7: integer,
    8: integer,
    9: integer,
    UNKNOWN: integer,
    SPACE: integer,
    ...
}

[source]

RmlUi.key_modifier


RmlUi.key_modifier : RmlUi.key_modifier {
    CTRL: integer,
    SHIFT: integer,
    ALT: integer,
    META: integer,
    CAPSLOCK: integer,
    NUMLOCK: integer,
    SCROLLLOCK: integer,
}

[source]

RmlUi.font_weight


RmlUi.font_weight : RmlUi.font_weight {
    Auto: integer,
    Normal: integer,
    Bold: integer,
}

[source]

RmlUi.default_action_phase


RmlUi.default_action_phase : RmlUi.default_action_phase {
    Auto: integer,
    Target: integer,
    TargetAndBubble: integer,
}

[source]

RmlUi.Context


RmlUi.Context : RmlUi.Context {
    dimensions: RmlUi.Vector2i,
    dp_ratio: number,
    documents: RmlUi.Document[],
    focus_element: RmlUi.Element,
    hover_element: RmlUi.Element,
    name: string,
    root_element: RmlUi.Element,
}

Holds documents and a data model. The Context class has no constructor; it must be instantiated through the CreateContext() function. It has the following functions and properties:

[source]

RmlUi.SolLuaDataModel


RmlUi.SolLuaDataModel : RmlUi.SolLuaDataModel<T>

Handle for your data model. It is a wrapper around the model table, marked as type T. You can access fields by using normal indexing, but for the moment, the only keys that work are strings. Any index done this way will automatically trigger a rerender. If you need to index any tables or subtables by anything not a string, you will need to use the underlying table, gotten with __GetTable. This will not trigger a rerender. To trigger a rerender manually, use _SetDirty, passing in the name of the top-level entry in your model table that you edited.

[source]

RmlUi.ElementText


RmlUi.ElementText : RmlUi.ElementText {
    text: string,
}

[source]

RmlUi.ElementTabSet


RmlUi.ElementTabSet : RmlUi.ElementTabSet {
    active_tab: integer,
    num_tabs: integer,
}

[source]

RmlUi.ElementProgress


RmlUi.ElementProgress : RmlUi.ElementProgress {
    value: number,
    max: number,
}

[source]

RmlUi.RmlModalFlag


RmlUi.RmlModalFlag : RmlUi.RmlModalFlag {
    None: integer,
    Modal: integer,
    Keep: integer,
}

[source]

RmlUi.RmlFocusFlag


RmlUi.RmlFocusFlag : RmlUi.RmlFocusFlag {
    None: integer,
    Document: integer,
    Keep: integer,
    Auto: integer,
}

[source]

RmlUi.Document


RmlUi.Document : RmlUi.Document {
    title: string,
    context: RmlUi.Context,
    url: string,
    modal: boolean,
    widget: table,
}

Document derives from Element. Document has no constructor; it must be instantiated through a Context object instead, either by loading an external RML file or creating an empty document. It has the following functions and properties:

[source]

RmlUi.ElementForm


RmlUi.ElementForm : RmlUi.ElementForm

[source]

RmlUi.ElementFormControl


RmlUi.ElementFormControl : RmlUi.ElementFormControl {
    disabled: boolean,
    name: string,
    value: string,
    submitted: boolean,
}

[source]

RmlUi.ElementFormControlInput


RmlUi.ElementFormControlInput : RmlUi.ElementFormControlInput {
    checked: boolean,
    maxlength: integer,
    size: integer,
    max: integer,
    min: integer,
    step: integer,
}

[source]

RmlUi.ElementFormControlSelect


RmlUi.ElementFormControlSelect : RmlUi.ElementFormControlSelect

[source]

RmlUi.ElementFormControlTextArea


RmlUi.ElementFormControlTextArea : RmlUi.ElementFormControlTextArea {
    cols: integer,
    maxlength: integer,
    rows: integer,
    wordwrap: boolean,
}

[source]