Menu / UI
Create Lua-owned tabs, subtabs, children and menu controls.
The menu library can extend supported Orion Solutions tabs or create completely custom Lua tabs.
menu.get_tab
menu.get_tab(name: string): menu_tab | nilReturns a supported built-in Orion Solutions tab.
Inventory Changer, Configurations and Scripts are intentionally unavailable to Lua and return nil.
menu.tab
menu.tab(name: string[, icon: string]): menu_tabCreates a custom top-level Lua tab. The optional icon uses a supported named FontAwesome icon. Unknown names fall back to code.
Example
local tab = menu.tab("My Script", "star")
tab:subtab
tab:subtab(name: string): menu_subtabCreates a new Lua subtab inside the selected tab.
tab:get_subtab
tab:get_subtab(name: string): native_subtab | nilTargets a stable native subtab location instead of creating a new one.
subtab:child
subtab:child(name: string, width: number, height: number): menu_childCreates a Lua-owned child panel.
native_subtab:get_child
native_subtab:get_child(name: string): native_childTargets an existing native child through a stable API ID.
child:checkbox
child:checkbox(label: string[, default: boolean]): menu_elementchild:slider_int
child:slider_int(label: string, min: number, max: number, default: number): menu_elementchild:slider_float
child:slider_float(label: string, min: number, max: number, default: number): menu_elementchild:combo
child:combo(label: string, items: table[, default: number]): menu_elementchild:multi_combo
child:multi_combo(label: string, items: table[, defaults: table]): menu_elementchild:button
child:button(label: string, callback: function): menu_elementchild:text
child:text(text: string): menu_elementElement Values
element:get()element:set(value)Controls expose their current value through :get() and can be updated through :set(...).
Named Icons
Custom tabs use named FontAwesome icons. Supported names include:
homecrosshairusersuserworldglobe
inventoryboxarchivefolderfolderopenfile
settingsgeargearswrenchtoolshammer
codebranchdatabasecomputerdesktopinfo
questionwarningcheckcloseeyehidden
shieldboltlightningfirestarcrown
gemghostgamepadgunbombbullseye
cameraimagepalettebrushdownloadupload
cloudsavecopysearchfilterlist
barsclockcalendarbellcommentcomments
mailplusminusplaypausestop
refreshrotateleftrightupdown
Full Example
local tab = menu.tab("Lua Test", "star")
local main = tab:subtab("Main")
local child = main:child("General", 290, 150)
local enabled = child:checkbox("Enabled", true)
child:slider_float("Amount", 0.0, 1.0, 0.5)
child:text("Custom Lua tab works")