Garry's Mod Wiki

Garry's Mod Wiki

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
This is NOT a function, it's a variable containing all registered via derma. DefineSkin derma skins.

Methods

derma.Color( string name, Panel pnl, table default )
Gets the color from a Derma skin of a panel and returns default color if not found
table derma.DefineControl( string name, string description, table tab, string base )
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. )
derma.DefineSkin( string name, string descriptions, table skin )
Defines a new skin so that it is usable by Derma. The default skin can be found in garrysmod/lua/skins/default. lua
Returns the derma. Controls table, a list of all derma controls registered with derma. DefineControl.
Returns the default skin table, which can be changed with the hook GM:ForceDermaSkin
table derma.GetNamedSkin( string name )
Returns the skin table of the skin with the supplied name
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.
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
function derma.SkinTexture( string name, Panel pnl, function fallback = nil )
Returns a function to draw a specified texture of panels skin. These are usually generated via GWEN. CreateTextureBorder and similar.

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...