Client
registerMenu
fjsf.registerMenu(data, func)Registers a menu in the NUI system.
Parameters
data
tableMenu configuration object.id
stringUnique menu identifier.title
stringMenu title displayed at the top.position
stringMenu position on screen. Allowed values:right-upright-middleright-downcenter-upcenter-middlecenter-downleft-upleft-middleleft-down
size
stringMenu size. Allowed values:smallmediumlarge
blur
booleanEnables background blur.sounds
booleanEnables menu sounds.options
tableList of menu options.
Menu option structure
Each entry in options supports:
label
stringOption label.description
string | nilDescription shown when highlighted.icon
string | nilFontAwesome icon class.iconAnim
string | nilOptional icon animation.disabled
boolean | nilDisables the option.checked
boolean | nilCheckbox option.values
table | nilScrollable option values.defaultIndex
number | nilDefault scroll index (1-based).progress
number | nilProgress bar value (0β100).
iconAnim
Visual animation applied to the option icon. Purely cosmetic, no logic impact.
Type: string | nil
If omitted, the icon is static.
Allowed values
spinspinReversespinSlowspinPulsepulsebeatbeatFadefadeblinkSoftbouncefloatorbitshakewiggleticktiltBreathscanpolarFloat
Invalid values are ignored by the UI.
Callbacks (data)
onSelected
functionCalled when highlighted option changes. Args:index (number)onCheck
functionCalled when checkbox changes. Args:index (number),checked (boolean)onSideScroll
functionCalled when scroll value changes. Args:index (number),scrollIndex (number)onClose
function | nilCalled when menu closes.
func
functionCalled when an option is pressed.Arguments:
index (number)scrollIndex (number | nil)
Example
showMenu
Displays a registered menu.
Example
closeMenu
Closes the active menu.
Example
setMenuOption
Updates a menu option dynamically.
Example
getActiveMenu
Example
Last updated