Garry's Mod Wiki

controlpanel.Get

controlpanel.Get

Description

Returns (or creates if not exists) a control panel.

Arguments

1 string name
The name of the panel. For normal tools this will be equal to TOOL.Mode (the tool's filename without the extension).

When you create a tool/option via spawnmenu.AddToolMenuOption, the internal control panel name is TOOL.Mode .. "_" .. tool_tab:lower() .. "_" .. tool_category:lower().

Returns

1 Panel
The ControlPanel panel.

Example

Get the Contextmenus panel for the weld tool.

local ControlPanel = controlpanel.Get( "Weld" )

Special Pages


Wikis

?

Render Time: 53ms

DB GetPage 34
Generate Html 4
SaveChanges (1) 5
Render Body 0
Render Sidebar 6