Menu
This Menu refers to the return value of Menu:Create
.
menu:SetTitle
Sets the title of the menu.
menu:SetTitle(title)
- title:
string
menu:SetSubtitle
Sets the subtitle of the menu.
menu:SetSubtitle(subtitle)
- subtitle:
string
menu:RemoveComponent
Removes a component from the menu.
menu:RemoveComponent(id)
- id:
string
menu:AddButton
Adds a button to the menu.
Returns a new component, that has been added to the menu.
menu:AddButton(label, rightLabel, description, badges, disabled)
- label:
string
- rightLabel?:
string
- description?:
string
- badges?:
table
(object
)- left?:
string
- right?:
string
- left?:
- disabled?:
boolean
menu:AddSubmenu
Adds a button to the menu, that opens a new menu on click.
Returns a new component, that has been added to the menu.
menu:AddSubmenu(submenu, label, rightLabel, description, badges, disabled)
- submenu:
Menu
- label:
string
- rightLabel?:
string
- description?:
string
- badges?:
table
(object
)- left?:
string
- right?:
string
- left?:
- disabled?:
boolean
menu:AddSeparator
Adds a separator to the menu.
Returns a new component, that has been added to the menu.
menu:AddSeparator(label, badges)
- label:
string
- badges?:
table
(object
)- left?:
string
- right?:
string
- left?:
menu:AddCheckbox
Adds a checkbox to the menu.
Returns a new component, that has been added to the menu.
menu:AddCheckbox(label, description, badges, checked, iconStyle, disabled)
- label:
string
- description?:
string
- badges?:
table
(object
)- left?:
string
- right?:
string
- left?:
- checked?:
boolean
- iconStyle?:
'tick'
|'cross'
- disabled?:
boolean
menu:AddList
Adds a list to the menu.
Returns a new component, that has been added to the menu.
menu:AddList(label, description, badges, values, current, disabled)
- label:
string
- description?:
string
- badges?:
table
(object
)- left?:
string
- right?:
string
- left?:
- values:
table
(array
) - current?:
number
- disabled?:
boolean
menu:AddSlider
Adds a slider to the menu.
Returns a new component, that has been added to the menu.
menu:AddSlider(label, description, badges, min, max, step, current, disabled)
- label:
string
- description?:
string
- badges?:
table
(object
)- left?:
string
- right?:
string
- left?:
- min:
number
- max:
number
- step:
number
- current?:
number
- disabled?:
boolean
menu:Open
Opens the menu.
menu:Open()
menu:Close
Closes the menu, if opened.
menu:Close()
menu:IsOpen
Returns true
if the menu is currently opened.
menu:IsOpen()
menu:getComponentById
Returns the component with the given id.
menu:getComponentById(id)
- id:
string