menu refers to the return value of Menu:Create
Submenu
menu:AddSubmenu adds a button component, but as a submenu.
Parameters
menu:AddSubmenu(menu, title, description?)| Name | Type | Description | Required |
|---|---|---|---|
| menu | object | The submenu that should be shown | Yes |
| title | string | The title of the component | Yes |
| description | string | The description of the component | No |
Example
client/example.lua
local menu--[[Menu]] = Menu:Create('Title', 'Description', 'top-right', '#fff');
local subMenu--[[Menu]] = Menu:Create('Submenu', 'Description', 'top-left', '#f000');
menu:AddSubmenu(subMenu, 'Knopf', 'Description');