Skip to main content

Menu : MenuComponent

Root Menu.

Properties

page: integer

isVisible: boolean

Functions

CreateMenu

Menu:CreateMenu( name: string, displayName: string, page: number ) Menu

ArgumentTypeDescription
namestringInternal name.
displayNamestringDisplay name.
pagenumberBase menu page.

Create and returns a root menu item.


AddTooltip

Menu:AddTooltip( tooltipString: string ) void

ArgumentTypeDescription
tooltipStringstringTooltip string.

Add tooltip to this element.


AddMenu

Menu:AddMenu( name: string, displayName: string ) Menu

ArgumentTypeDescription
namestringInternal name.
displayNamestringDisplay name.

Create and returns sub menu.


AddCheckBox

Menu:AddCheckBox(
name: string,
displayName: string,
defaultValue: boolean,
callback: function
) CheckBox

ArgumentTypeDescription
namestringInternal name.
displayNamestringDisplay name.
defaultValuebooleanDefault value.
callbackfunctionCallback when value change.

Add a checkbox to menu.


AddColorPicker

Menu:AddColorPicker(
name: string,
displayName: string,
defaultValue: color,
hasCheckBox: boolean,
checkBoxDefaultValue: boolean,
callback: function
) ColorPicker

ArgumentTypeDescription
namestringInternal name.
displayNamestringDisplay name.
defaultValuecolorDefault color value.
hasCheckBoxbooleanHas checkbox
checkBoxDefaultValuebooleanCheckbox default value.
callbackfunctionCallback when value change.

Add a colorpicker to menu.


AddInfo

Menu:AddInfo( name: string, displayName: string ) void

ArgumentTypeDescription
namestringInternal name.
displayNamestringDisplay name.

Add an info text to menu.


AddKeyBind

Menu:AddKeyBind(
name: string,
displayName: string,
key: number - unsigned char,
defaultValue: boolean,
isToggle: boolean,
callback?: function
) KeyBind

ArgumentTypeDescription
namestringInternal name.
displayNamestringDisplay name.
keynumber - unsigned charKey.
defaultValuebooleanDefault value.
isTogglebooleanIs toggle.
callback?functionCallback when value change.

Add a keybind to menu.


AddList

Menu:AddList(
name: string,
displayName: string,
items: string table,
defaultValue: integer,
callback: function
) List

ArgumentTypeDescription
namestringInternal name.
displayNamestringDisplay name.
itemsstring tableSelect items.
defaultValueintegerDefault select value.
callbackfunctionCallback when value change.

Add a list to menu.


AddSlider

Menu:AddSlider(
name: string,
displayName: string,
defaultValue: integer,
minimumValue: integer,
maximumValue: integer,
step: integer,
callback: function
) Slider

ArgumentTypeDescription
namestringInternal name.
displayNamestringDisplay name.
defaultValueintegerDefault value.
minimumValueintegerMinimum value.
maximumValueintegerMaximum value.
stepintegerSlider step per pix.
callbackfunctionCallback when value change.

Add a slider to menu.