Garry's Mod Wiki



A simple menu with sub menu, icon and convar support.


Derives from DScrollPanel.


Creates a DMenu with a submenu.

local Menu = DermaMenu() -- Add a simple option. Menu:AddOption( "Simple option" ) -- Simple option, but we're going to add an icon local btnWithIcon = Menu:AddOption( "Option with icon" ) btnWithIcon:SetIcon( "icon16/bug.png" ) -- Icons are in materials/icon16 folder -- Adds a simple line spacer Menu:AddSpacer() -- Add a submenu local SubMenu = Menu:AddSubMenu( "A Sub Menu" ) SubMenu:AddOption( "Sub Option #1" ):SetIcon( "icon16/group.png" ) -- Add a submenu with icon local Child, Parent = Menu:AddSubMenu( "A Sub Menu with Icon" ) Parent:SetIcon( "icon16/arrow_refresh.png" ) Child:AddOption( "Sub Option #2" ):SetIcon( "icon16/group.png" ) -- Open the menu Menu:Open()

Page Links

Special Pages



Render Time: 29ms

Session 0
DB GetPage 3
Generate Html 2
SaveChanges 11
Render Body 0
Render Sidebar 12