Radial Menu
Radial menu has a global menu that's by default accessed with
z
and only displays when there is at least one item.You can add and remove items from the global menu using
lib.addRadialItem
andlib.removeRadialItem
.Use
lib.registerRadial
for creating sub menus and use themenu
property on the items to open those sub menus.
lib.addRadialItem
Item or array of items added to the global radial menu.
id:
string
Id that is used for removing options.
icon:
string
label:
string
Label uses to insert a newline
menu?:
string
Id of a menu to open.
onSelect:
function(currentMenu: string | nil, itemIndex: number)
|string
Function that's ran when a user clicks the item.
keepOpen?:
boolean
lib.removeRadialItem
Id of an item to be removed from the global menu
id:
string
lib.clearRadialItems
Removes all items from the radial menu.
lib.registerRadial
Registers a radial sub menu with predefined options.
id:
string
Unique menu id used to open with
menu
prop on an item.
items:
array
icon:
string
label:
string
Label uses to insert a newline
menu?:
string
Id of a menu to open.
onSelect?:
function(currentMenu: string | nil, itemIndex: number)
|string
Function that's ran when a user clicks the item.
lib.hideRadial
Hides the radial menu if one is open.
lib.disableRadial
Disallow players from opening the radial menu.
state:
boolean
Whether or not radial menu should be disabled
Usage Example
Here's a use case example with some global options and an option utilising the lib's points system.
Last updated