Garry's Mod Wiki

ControlPanel

ControlPanel

Description

Used by the context menu in sandbox.

Parent

Derives methods, etc not listed on this page from DForm.

Methods

ControlPanel:AddControl( string type, table controlinfo )
We advise against using this. It may be changed or removed in a future update. It is recommended to use DForm's members instead. Adds a control to the control panel.
ControlPanel:AddPanel( Panel panel )
Adds an item by calling DForm:AddItem.
Panel ControlPanel:ColorPicker( string label, string convarR, string convarG, string convarB, string convarA )
Creates a CtrlColor (a color picker) panel and adds it as an item.
ControlPanel:ControlValues( table data )
Sets control values of the control panel.
ControlPanel:FillViaFunction( function func )
Calls the given function with this panel as the only argument. Used by the spawnmenu to populate the control panel.
ControlPanel ControlPanel:GetEmbeddedPanel()
Returns this control panel.
Panel ControlPanel:KeyBinder( string label1, string convar1, string label2 = "nil", string convar2 = "nil" )
Creates a CtrlNumPad (a Sandbox key binder) panel and adds it as an item.
MatSelect ControlPanel:MatSelect( string convar, table options = nil, boolean autostretch = nil, number width = nil, number height = nil )
Creates a MatSelect panel and adds it as an item.
Panel ControlPanel:ToolPresets( string group, table cvarList )
Creates a ControlPresets panel and adds it as an item.

Special Pages


Wikis

?

Render Time: 23ms

DB GetPage 1
Generate Html 3
SaveChanges (1) 8
Render Body 0
Render Sidebar 7