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.
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:FillViaFunction( function func )
Calls the given function with this panel as the only argument. Used by the spawnmenu to populate the 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.