Scripting

Custom UI

Native panels, buttons and popups created and owned by your script.

fn on_new_game(ctx) {
    // this.panel() is your own helper that returns a node tree.
    [#{op: "ui", widget: #{
        id: "panel",
        tree: this.panel(),
        actions: #{"Body/Button": "on_click"},
        modal: true
    }}]
}
fn on_click(ctx) {
    [#{op: "cash", amount: 500}, #{op: "remove_ui", id: "panel"}]
}

The tree format

Widgets use the same name / active / rect / comps / children shape as the game's exported UI. Text, images, buttons, masks, anchoring and layout groups render through the native UI renderer.

LimitValue
Active widgets64
Nodes per widget128
Tree depth12 levels
Action bindings32
Note

Runtime UI targets in-match overlays. To change existing frontend pages, use menu edits; arbitrary new frontend screens are still pending.