ui
The ui namespace. Nyx Lua API v1.
ui.toggle
Section titled ui.toggleui.toggle(id: string, label: string, default: boolean?) -> ControlA switch on the script's card.
ui.slider_int
Section titled ui.slider_intui.slider_int(id: string, label: string, min: number, max: number, default: number?) -> ControlA whole-number slider.
ui.slider_float
Section titled ui.slider_floatui.slider_float(id: string, label: string, min: number, max: number, default: number?, decimals: number?) -> ControlA decimal slider.
ui.combo
Section titled ui.comboui.combo(id: string, label: string, items: {string}, default: number?) -> ControlOne choice of items; get returns its 1-based index.
ui.multi_combo
Section titled ui.multi_comboui.multi_combo(id: string, label: string, items: {string}, defaults: {boolean}?) -> ControlAny number of items; get returns a list of booleans.
ui.color
Section titled ui.colorui.color(id: string, label: string, default: number?) -> ControlA colour picker; get returns a packed colour.
ui.keybind
Section titled ui.keybindui.keybind(id: string, label: string) -> ControlA key the user binds (hold/toggle/always); get returns whether it is active.
ui.text_input
Section titled ui.text_inputui.text_input(id: string, label: string, default: string?, max_len: number?) -> ControlOne line of text (max_len 1-256).
ui.button
Section titled ui.buttonui.button(id: string, label: string, on_click: () -> ()) -> ControlA button; on_click runs on the next frame.
ui.label
Section titled ui.labelui.label(text: string) -> ControlA line of text.
ui.separator
Section titled ui.separatorui.separator() -> ControlA divider.
ui.window
Section titled ui.windowui.window(id: string, title: string, size: vector) -> WindowA HUD window the user can drag; draw in its on_paint.
ui.sidebar
Section titled ui.sidebarui.sidebar(title: string?, icon: string?) -> (string, string)The script's tab at the foot of the sidebar: a title (one line, 32 bytes; empty = the file name) and a Font Awesome 7 Free solid icon name. nil keeps a value; returns the title and icon in effect. An unknown icon falls back to file-code with a console warning.
ui.get
Section titled ui.getui.get(key: string) -> (number | string)?A Nyx setting by config key (e.g. ESP.Box); booleans read as 0/1. An edit in the menu reads back once the menu closes. Keys under Script., Bind., Tab., Chat., Menu., HudPos. and Skin. are refused (an error), as for ui.override.
ui.override
Section titled ui.overrideui.override(key: string, value: boolean | number | string) -> ()Overrides a Nyx setting while the script runs; never saved, undone on unload.
ui.clear_override
Section titled ui.clear_overrideui.clear_override(key: string) -> ()Gives a setting back to the user.
Nyx Lua API v1 · release commit-4b659d9c3810 · d0f772c99281