Garry's Mod Wiki

DMenu:AddSpacer

DMenu:AddSpacer()

Description

Adds a horizontal line spacer.

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:

Page Links


Special Pages


Wikis

?

Render Time: 39ms

DB GetPage 4
Generate Html 1
SaveChanges (1) 19
Render Body 0
Render Sidebar 13