Skip to main content
Client Through ug-lib.

Register

string
required
Registering it again replaces it.
string
required
table[]
required
1 to 100 items.
UgPosition
Defaults to settings.menuPosition.
function
(index, scrollIndex, args) on the select key.
function
(index, scrollIndex, args) when the selection moves.
function
(index, scrollIndex, args).
function
(index, checked, args).
function
Closed without a closing selection.
boolean
default:"true"
The back key closes.
boolean
default:"false"
Blocks movement and combat while open.
Items: label, description (shown while selected), icon, values (side-scroll labels), defaultIndex, checked (makes a checkbox, not with values), progress, close (default true) and args. scrollIndex is nil for items without values.

Keys

ug-lib owns the keys: up, down, left, right, select and back, with settings.menuKeys as defaults. Players MAY rebind them. They do nothing while a modal is open.
  • Select on a checkbox toggles it. Select on an item with close = false calls onSelect and stays open. Otherwise the menu closes after onSelect.
  • One menu at a time: a new menu from any resource replaces the open one, and the old one’s onClose runs.
  • SetItem changes label, description, icon, values, checked or progress of an item. An open menu updates in place and keeps its selection.

Example

client.lua