Context Menu
- Open Menu
exports['wd-uikit']:openMenu({
{
header = "Main Title",
isMenuHeader = true, -- Set to true to make a nonclickable title
},
{
header = "Menu Button",
txt = "This is a menu button.",
icon = 'FaTrash',
params = {
event = "wd-uikit:debug",
args = {
number = 1,
}
}
},
{
header = "Sub Menu Button",
txt = "This goes to a sub menu",
sub = true,
params = {
event = "wd-uikit:debug",
args = {
number = 1,
}
}
},
{
header = "Empty Menu Button",
txt = "This is an empty menu button.",
isMenuEmpty = true
},
})
or
TriggerEvent('wd-uikit:openMenu', {
{
header = "Main Title",
isMenuHeader = true, -- Set to true to make a nonclickable title
},
{
header = "Menu Button",
txt = "This is a menu button.",
icon = 'FaTrash',
params = {
event = "wd-uikit:debug",
args = {
number = 1,
}
}
},
{
header = "Sub Menu Button",
txt = "This goes to a sub menu",
sub = true,
params = {
event = "wd-uikit:debug",
args = {
number = 1,
}
}
},
{
header = "Empty Menu Button",
txt = "This is an empty menu button.",
isMenuEmpty = true
},
})
Menu Variables
header
= Header of the menu.txt
= Description of the menu.icon
= Icon of the menu.params
=event
= Event name / command name / callback function for the menu.args
= Action args.isServer
= Declares the event if it is a server event.isCommand
= Declares the event if it is a command.isAction
= Declares the event if it is a callback function.
info
You can get menu icons from here.