Garry's Mod Wiki

DermaMenu

Description

Creates a DMenu and closes any current menus.

Arguments

1 Panel parent
The panel to parent the created menu to.

Returns

1 Panel
The created DMenu

Example

Creates a DMenu with buttons to commit suicide or close it.

local menu = DermaMenu() menu:AddOption("Die", function() RunConsoleCommand("kill") end) menu:AddOption("Close", function() print("Close pressed") end) -- The menu will remove itself, we don't have to do anything. menu:Open()
Output:

Page Links


Special Pages


Wikis

?

Render Time: 34ms

DB GetPage 3
Generate Html 7
SaveChanges 10
Render Body 0
Render Sidebar 13