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: