Client
registerContext
fjsf.registerContext(data)Registers a client-side context menu in the NUI system.
Parameters
data
tableContext configuration object.Supported fields:
id
stringUnique context identifier.title
stringContext title.position
stringScreen position. Allowed values:right-upright-middleright-downcenter-upcenter-middlecenter-downleft-upleft-middleleft-down
size
stringContext size. Allowed values:smallmediumlarge
blur
booleanEnable background blur.sounds
booleanEnable sounds.menu
string | nilParent context ID (back navigation).options
tableList of context options.onClose
function | nilCalled when the context is closed.onBack
function | nilCalled when the back button is pressed.
Context option structure
Each entry in options supports:
title
stringOption title.description
string | nilOptional description text.icon
string | nilFontAwesome icon class.iconAnim
string | nilOptional icon animation class.disabled
boolean | nilDisables the option.menu
string | nilOpens another registered context.event
string | nilTriggers a client event.ServerEvent
string | nilTriggers a server event.onSelect
function | nilCalled when the option is selected.
iconAnim
Visual animation applied to the option icon. Cosmetic only.
Type: string | nil
Allowed values
spinspinReversespinSlowspinPulsepulsebeatbeatFadefadeblinkSoftbouncefloatorbitshakewiggleticktiltBreathscanpolarFloat
Invalid values are ignored.
Returns
This function does not return anything.
Example
showContext
Displays a registered context menu and enables NUI focus.
Example
closeContext
Closes the active context menu.
Example
setContextOption
Updates a context option dynamically.
Example
getActiveContext
Example
Last updated