Skip to content

UIMenuItem

Fields

This class has no fields.


Functions

Get

This function has no parameters.

Return value

Name Type Description
value mixed Item value
local checkbox = Menu.CheckboxColorEdit("my first checkbox", false, Color.new())
local state = checkbox:Get()

Set

Name Type Description
Set mixed New item value
local checkbox = Menu.CheckboxColorEdit("my first checkbox", false, Color.new())
checkbox:Set(true)

SetColor

Name Type Description
color Color New color value
local checkbox = Menu.CheckboxColorEdit("my first checkbox", false, Color.new())
local color = checkbox:GetColor()

SetColor

Name Type Description
color Color New color value
local checkbox = Menu.CheckboxColorEdit("my first checkbox", false, Color.new())
checkbox:SetColor(Color.new(1.0, 0.0, 0.0, 1.0))

SetLabel

Name Type Description
label string
local checkbox = Menu.Checkbox("my first checkbox", false)
checkbox:SetLabel('new label')

SetVisible

Name Type Description
state value
local checkbox = Menu.Checkbox("my first checkbox", false)
checkbox:SetVisible(false)

RegisterCallback

Name Type Description
callback function -
local checkbox = Menu.Checkbox("my first checkbox", false)
checkbox:RegisterCallback(function(value)
    print(value)
end)