Category:DMenu

From Garry's Mod
Jump to: navigation, search
Example DMenu

Contents

DescriptionPanelPage

A simple DMenu

Parent: DScrollPanel

Search on GitHub - What links here?

Examples

Example

Creates a DMenu with a submenu.

local Menu = DermaMenu() 		-- Is the same as  vgui.Create("DMenu")
Menu:AddOption( "Simple option" ) 	-- Add a simple option.

local btnWithIcon = Menu:AddOption( "Option with icon" ) -- Simple option, but we're going to add an icon
btnWithIcon:SetIcon( "icon16/bug.png" )	-- Icons are in materials/icon16 folder

Menu:AddSpacer()			-- Adds a simple line spacer

local SubMenu = Menu:AddSubMenu( "A Sub Menu" )				-- Add a submenu
SubMenu:AddOption( "Sub Option #1" ):SetIcon( "icon16/group.png" )	-- SetIcon possible like this

Menu:Open()


Methods

Pages in category "DMenu"

The following 5 pages are in this category, out of 5 total.

Personal tools
Navigation