DMenu/AddSpacer

From Garry's Mod
Jump to: navigation, search
 DMenu:AddSpacer( )

DescriptionPanelFunc

Adds a horizontal line spacer.

Examples

Example

Creates a DMenu with 3 options and adds a spacer before the third.

local m = DermaMenu()

m:AddOption( "Kill yourself", function() RunConsoleCommand( "kill" ) end ) -- Add first option
m:AddOption( "Disconnect", function() RunConsoleCommand( "disconnect" ) end ) -- Add second option

m:AddSpacer() -- Add a spacer

m:AddOption( "Say hi", function() RunConsoleCommand( "say", "Hi!" ) end ) -- Add third option

m:Open() -- Show our menu

Output:



DMenu spacer.png
Personal tools
Navigation