From Garry's Mod
Revision as of 16:11, 10 July 2016 by Zerf
Creates a DMenu similar to a contextmenu and closes any current menus
The panel to parent the created menu to.
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()