Garry's Mod Wiki



The derma library allows you to add custom derma controls and create & modify derma skins.


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:PreA..
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
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
table derma.GetNamedSkin( string name )
Returns the skin table of the skin with the supplied name
table derma.GetSkinTable()
Returns a copy of the table containing every Derma skin
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, number w, number h )
Calls the specified hook for the given panel
function derma.SkinTexture( string name, Panel pnl, any fallback = nil )
Returns a function to draw a specified texture of panels skin.

Special Pages



Render Time: 58ms

DB GetPage 41
Generate Html 3
SaveChanges (1) 6
Render Body 0
Render Sidebar 6