Skip to main content
Load-time only. Calling ui.* from a callback errors.

Tabs and groups

Elements can be organized into tabs and groups.
These tabs appear inside your script’s page, not in the main menu bar. Members take a dot. Groups lay out across two columns in declaration order. Skip either level and it falls back to something named after your script:
The tab bar hides itself when there is only one tab.

Elements

Every element exists on ui and on every group handle. Every element except TextInput gets a hotkey automatically. There is no Hotkey element.

Handles

Get and Set take a colon.
At load time, Get() returns the declared default. Restored values are applied after loading.

Lists

ListBox is an always-open scrolling list with one selected row. handle:SetItems(table) replaces the whole list from any callback — that is how you build a list that grows.
SetItems accepts only strings. Selection stays at the same index when possible, clamps when the list shrinks, and becomes -1 when empty.

Text

TextInput is a one-line field. Read it with Get, or take handle:OnSubmit(fn) to be called when the user presses enter or leaves the field.
OnSubmit returns the handle for chaining. Pass nil to remove the handler. It can be called from callbacks.

Showing and hiding

handle:SetVisible(bool) on any handle, including Label and Divider. Siblings reflow, the group shrinks. Call it from a paint callback to drive it off another element:
Elements start visible. Hiding an element does not change its value.

Built-in controls

ui.Get and ui.Set read and write the cheat’s own controls (not the ones your script created, those use the handle above).
Both error if no control matches the path.

Buttons

Buttons have no value. Use ui.Click(path) to activate one.
Errors if nothing matches the path, or if the path matches a control that is not a button. Works on script buttons too, by their path in the scripts tab. The button callback runs on the thread that called ui.Click. Color pickers use Color. ui.Set(path, ui.Get(path)) preserves the solid color but not the picker’s rainbow or pulse mode.