Client

registerMenu

fjsf.registerMenu(data, func)

Registers a menu in the NUI system.


Parameters

  • data table Menu configuration object.

    • id string Unique menu identifier.

    • title string Menu title displayed at the top.

    • position string Menu position on screen. Allowed values:

      • right-up

      • right-middle

      • right-down

      • center-up

      • center-middle

      • center-down

      • left-up

      • left-middle

      • left-down

    • size string Menu size. Allowed values:

      • small

      • medium

      • large

    • blur boolean Enables background blur.

    • sounds boolean Enables menu sounds.

    • options table List of menu options.


Each entry in options supports:

  • label string Option label.

  • description string | nil Description shown when highlighted.

  • icon string | nil FontAwesome icon class.

  • iconAnim string | nil Optional icon animation.

  • disabled boolean | nil Disables the option.

  • checked boolean | nil Checkbox option.

  • values table | nil Scrollable option values.

  • defaultIndex number | nil Default scroll index (1-based).

  • progress number | nil Progress 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

  • spin

  • spinReverse

  • spinSlow

  • spinPulse

  • pulse

  • beat

  • beatFade

  • fade

  • blinkSoft

  • bounce

  • float

  • orbit

  • shake

  • wiggle

  • tick

  • tiltBreath

  • scan

  • polarFloat

Invalid values are ignored by the UI.


Callbacks (data)

  • onSelected function Called when highlighted option changes. Args: index (number)

  • onCheck function Called when checkbox changes. Args: index (number), checked (boolean)

  • onSideScroll function Called when scroll value changes. Args: index (number), scrollIndex (number)

  • onClose function | nil Called when menu closes.


  • func function Called 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