derma
The derma library allows you to add custom derma controls and create & modify derma skins.
Fields
This is NOT a function, it's a variable containing all derma controls, registered with derma. DefineControl.
Use derma. GetControlList to retrieve this list.
It's a list of tables, each having 3 keys, all from derma. DefineControl arguments:
string ClassName - The class name of the panel
string Description - The description of the panel
string BaseClass - The base class of the panel
Methods
Gets the color from a Derma skin of a panel and returns default color if not found
Defines a new Derma control with an optional base.
This calls vgui. Register internally, but also does the following:
Adds the control to derma. GetControlList
Adds a key "Derma" - This is returned by derma. GetControlList
Makes a global table with the name of the control (This is technically deprecated and should not be relied upon)
If reloading (i. e. called this function with name of an existing panel), updates all existing instances of panels with this name. (Updates functions, calls PANEL:PreAutoRefresh and PANEL:PostAutoRefresh, etc. )
Defines a new skin so that it is usable by Derma. The default skin can be found in garrysmod/lua/skins/default. lua
table derma.GetControlList()
Returns the derma. Controls table, a list of all derma controls registered with derma. DefineControl.
table derma.GetDefaultSkin()
Returns the default skin table, which can be changed with the hook GM:ForceDermaSkin
Returns the skin table of the skin with the supplied name
table derma.GetSkinTable()
Returns a copy of the table containing every Derma skin
derma.RefreshSkins()
Clears all cached panels so that they reassess which skin they should be using.
number derma.SkinChangeIndex()
Returns how many times derma. RefreshSkins has been called.
any derma.SkinHook( string type, string name, Panel panel, any vararg1 = nil, any vararg2 = nil, any vararg3 = nil, any vararg4 = nil )
Calls the specified hook for the given panel
Returns a function to draw a specified texture of panels skin.
These are usually generated via GWEN. CreateTextureBorder and similar.