ButtonItem:class  global

Extends: Item

Button item for MenuV


ButtonItem#event:enter

Type: event

Event will be triggered when item becomes active/selected in NUI

Parameters
  • item : ItemRequired

    Current active/selected item

Example

item:On('enter', function(item)
    print('You have entered this item :)')
end)

ButtonItem#event:leave

Type: event

Event will be triggered when item becomes inactive/unselected in NUI

Parameters
  • item : ItemRequired

    Current inactive/unselected item

Example

item:On('leave', function(item)
    print('You have unselected this item :(')
end)

ButtonItem#event:select

Type: event

Event will be triggered when user pressed ENTER on item

Parameters

Example

item:On('select', function(item)
    print('You have updated this item :)')
end)

ButtonItem#event:update

Type: event

Event will be triggered when item's value changed

Parameters
  • item : ItemRequired

    Current updated item

  • key : stringRequired

    Current updated key

  • value : anyRequired

    Current updated value

  • oldValue : anyRequired

    Previous value

Example

item:On('update', function(item, key, value, oldValue)
    print('You have updated this item :)')
end)

CheckboxItem:class  global

Extends: Item

Checkbox item for MenuV


CheckboxItem.Value:boolean  static

Value: false

Type: boolean

Value of CheckboxItem


CheckboxItem#event:change

Type: event

Event will be triggered when user changed checkbox state

Parameters
  • item : CheckboxItemRequired

    Current changed checkbox item

  • newValue : booleanRequired

    New state of checkbox

  • oldValue : booleanRequired

    Previous state of checkbox

Example

item:On('change', function(item, newValue, oldValue)
    print('You have changed them checkbox state :)')
end)

CheckboxItem#event:check

Type: event

Event will be triggered when user check the checkbox

Parameters

Example

item:On('check', function(item)
    print('You have set the checkbox state to checked :D')
end)

CheckboxItem#event:enter

Type: event

Event will be triggered when item becomes active/selected in NUI

Parameters
  • item : ItemRequired

    Current active/selected item

Example

item:On('enter', function(item)
    print('You have entered this item :)')
end)

CheckboxItem#event:leave

Type: event

Event will be triggered when item becomes inactive/unselected in NUI

Parameters
  • item : ItemRequired

    Current inactive/unselected item

Example

item:On('leave', function(item)
    print('You have unselected this item :(')
end)

CheckboxItem#event:uncheck

Type: event

Event will be triggered when user uncheck the checkbox

Parameters
  • item : CheckboxItemRequired

    Current unchecked checkbox item

Example

item:On('uncheck', function(item)
    print('You have set the checkbox state to unchecked :(')
end)

CheckboxItem#event:update

Type: event

Event will be triggered when item's value changed

Parameters
  • item : ItemRequired

    Current updated item

  • key : stringRequired

    Current updated key

  • value : anyRequired

    Current updated value

  • oldValue : anyRequired

    Previous value

Example

item:On('update', function(item, key, value, oldValue)
    print('You have updated this item :)')
end)

ConfirmItem:class  global

Extends: Item

Confirm item for MenuV


ConfirmItem#Confirm()void

Type: function

Confirm this item, set confirm state to true


ConfirmItem#Deny()void

Type: function

Deny this item, set confirm state to false


ConfirmItem.Value:boolean  static

Value: false

Type: boolean

Value of ConfirmItem


ConfirmItem#event:change

Type: event

Event will be triggered when user changed confirm state

Parameters
  • item : ConfirmItemRequired

    Current changed confirm item

  • newValue : booleanRequired

    New state of confirm

  • oldValue : booleanRequired

    Previous state of confirm

Example

item:On('change', function(item, newValue, oldValue)
    print('You have changed them confirm state :)')
end)

ConfirmItem#event:confirm

Type: event

Event will be triggered when user confirm the ConfirmItem

Parameters
  • item : ConfirmItemRequired

    Current confirmed confirm item

Example

item:On('confirm', function(item)
    print('You have confirmed the confirm item :D')
end)

ConfirmItem#event:deny

Type: event

Event will be triggered when user denied the ConfirmItem

Parameters
  • item : ConfirmItemRequired

    Current denied confirm item

Example

item:On('deny', function(item)
    print('You have denied the confirm item :D')
end)

ConfirmItem#event:enter

Type: event

Event will be triggered when item becomes active/selected in NUI

Parameters
  • item : ItemRequired

    Current active/selected item

Example

item:On('enter', function(item)
    print('You have entered this item :)')
end)

ConfirmItem#event:leave

Type: event

Event will be triggered when item becomes inactive/unselected in NUI

Parameters
  • item : ItemRequired

    Current inactive/unselected item

Example

item:On('leave', function(item)
    print('You have unselected this item :(')
end)

ConfirmItem#event:update

Type: event

Event will be triggered when item's value changed

Parameters
  • item : ItemRequired

    Current updated item

  • key : stringRequired

    Current updated key

  • value : anyRequired

    Current updated value

  • oldValue : anyRequired

    Previous value

Example

item:On('update', function(item, key, value, oldValue)
    print('You have updated this item :)')
end)

Item:class  global

Item for MenuV


Item#GetParentMenu(item)Menu

Type: function

Returns the Menu where item is added to (Parent Menu)

Parameters
  • item : ItemRequired

    Item to get parent menu from

Returns:  Menu  —  Parent's menu


Item#GetValue(item)any|nil

Type: function

Get current item's value with some validation, see Item.Value

Parameters
  • item : ItemRequired

    Item to get value from

Returns:  any|nil  —  Return current valid value or nil


Item#On(item, event, func)void

Type: function

Register a function as on event trigger

Parameters
  • item : ItemRequired

    Item to register function for

  • event : stringRequired

    Name of on event to trigger

  • func : functionRequired

    Function to trigger


Item.Description:string  static

Value: ''

Type: string

Description of menu item


Item.Disabled:boolean  static

Value: ''

Type: boolean

Disabled state of menu item


Item.Icon:string  static

Value: 'none'

Type: string

Icon of menu item


Item.Label:string  static

Value: ''

Type: string

Label of menu item


Item.SaveOnUpdate:boolean  static

Value: false

Type: boolean

When item value changed, force to save changes


Item.UUID:string  static readonly

Type: string

Universally Unique Identifier (UUID)


Item.Value:any  static

Value: ''

Type: any

Value of menu item


Item#event:enter

Type: event

Event will be triggered when item becomes active/selected in NUI

Parameters
  • item : ItemRequired

    Current active/selected item

Example

item:On('enter', function(item)
    print('You have entered this item :)')
end)

Item#event:leave

Type: event

Event will be triggered when item becomes inactive/unselected in NUI

Parameters
  • item : ItemRequired

    Current inactive/unselected item

Example

item:On('leave', function(item)
    print('You have unselected this item :(')
end)

Item#event:update

Type: event

Event will be triggered when item's value changed

Parameters
  • item : ItemRequired

    Current updated item

  • key : stringRequired

    Current updated key

  • value : anyRequired

    Current updated value

  • oldValue : anyRequired

    Previous value

Example

item:On('update', function(item, key, value, oldValue)
    print('You have updated this item :)')
end)



































RangeItem:class  global

Extends: Item

Range item for MenuV


RangeItem#SetMaxValue(input)void

Type: function

Change RangeItem.Max

Parameters
  • input : numberRequired

    New maximal value


RangeItem#SetMinValue(input)void

Type: function

Change RangeItem.Min

Parameters
  • input : numberRequired

    New minimal value


RangeItem.Max:number  static

Value: 0

Type: number

Maximal possible value


RangeItem.Min:number  static

Value: 0

Type: number

Minimal possible value


RangeItem.Value:number  static

Value: 0

Type: number

Value of range item (default lowest possible value)


RangeItem#event:change

Type: event

Event will be triggered when user changed range state

Parameters
  • item : RangeItemRequired

    Current changed range item

  • newValue : numberRequired

    New value of range item

  • oldValue : numberRequired

    Previous value of range item

Example

item:On('change', function(item, newValue, oldValue)
    print('You have changed them range :)')
end)

RangeItem#event:enter

Type: event

Event will be triggered when item becomes active/selected in NUI

Parameters
  • item : ItemRequired

    Current active/selected item

Example

item:On('enter', function(item)
    print('You have entered this item :)')
end)

RangeItem#event:leave

Type: event

Event will be triggered when item becomes inactive/unselected in NUI

Parameters
  • item : ItemRequired

    Current inactive/unselected item

Example

item:On('leave', function(item)
    print('You have unselected this item :(')
end)

RangeItem#event:select

Type: event

Event will be triggered when user pressed 'ENTER' in range item

Parameters
  • item : RangeItemRequired

    Current selected range item

  • value : numberRequired

    Value of range item

Example

item:On('select', function(item, value)
    print('You have select a range option :)')
end)

RangeItem#event:update

Type: event

Event will be triggered when item's value changed

Parameters
  • item : ItemRequired

    Current updated item

  • key : stringRequired

    Current updated key

  • value : anyRequired

    Current updated value

  • oldValue : anyRequired

    Previous value

Example

item:On('update', function(item, key, value, oldValue)
    print('You have updated this item :)')
end)

SliderItem:class  global

Extends: Item

Slider item for MenuV


SliderItem#AddValue(item, value)void

Type: function

Add a value to slider

Parameters
  • item : SliderItemRequired

    SliderItem to add a value for

  • value : tableRequired

    Value information

  • value.label : stringDefault: 'Value'

    Label of value item

  • value.description : stringDefault: ''

    Description of value item

  • value.value : anyDefault: null

    Value of value item


SliderItem#AddValues(item, ...values)void

Type: function

Add a list of values to slider

Parameters
  • item : SliderItemRequired

    SliderItem to add values for

  • ...values : ...tableRequired

    Value information

  • value.label : stringDefault: 'Value'

    Label of value item

  • value.description : stringDefault: ''

    Description of value item

  • value.value : anyDefault: null

    Value of value item


SliderItem.Value:number  static

Value: 1

Type: number

Value of slider item (current selected index)


SliderItem#event:change

Type: event

Event will be triggered when user changed slider state

Parameters
  • item : SliderItemRequired

    Current changed slider item

  • newValue : numberRequired

    New index of slider item

  • oldValue : numberRequired

    Previous index of slider item

Example

item:On('change', function(item, newValue, oldValue)
    print('You have changed them slider :)')
end)

SliderItem#event:enter

Type: event

Event will be triggered when item becomes active/selected in NUI

Parameters
  • item : ItemRequired

    Current active/selected item

Example

item:On('enter', function(item)
    print('You have entered this item :)')
end)

SliderItem#event:leave

Type: event

Event will be triggered when item becomes inactive/unselected in NUI

Parameters
  • item : ItemRequired

    Current inactive/unselected item

Example

item:On('leave', function(item)
    print('You have unselected this item :(')
end)

SliderItem#event:select

Type: event

Event will be triggered when user pressed 'ENTER' in slider item

Parameters
  • item : SliderItemRequired

    Current selected slider item

  • value : anyRequired

    Value from selected option

Example

item:On('select', function(item, value)
    print('You have select a slider option :)')
end)

SliderItem#event:update

Type: event

Event will be triggered when item's value changed

Parameters
  • item : ItemRequired

    Current updated item

  • key : stringRequired

    Current updated key

  • value : anyRequired

    Current updated value

  • oldValue : anyRequired

    Previous value

Example

item:On('update', function(item, key, value, oldValue)
    print('You have updated this item :)')
end)

table:object  global

Object


threads:Array<number>  global

List of threads



Documentation built with Docma.