Derma.DefineSkin

From GMod Wiki

Jump to: navigation, search
Function
Syntax Derma.DefineSkin( String skin name , String skin description, Object Skin )
Where is this used?
Description:
Defines the skin which can be set as the active derma skin
Returns: nil
Part of Library: Derma
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Derma.DefineSkin]Derma.DefineSkin [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionBlue colored derma skin.
Used onNewerClient.png
Code
 
local SKIN = {}
 
function SKIN:DrawGenericBackground( x, y, w, h, color )
 
	surface.SetDrawColor( 0, 0, 100, 100 )
	surface.DrawRect( x, y, w, h )
 
	surface.SetDrawColor( 180, 180, 255, 200 )
	surface.DrawOutlinedRect( x, y, w, h )
	surface.SetDrawColor( 150, 150, 225, 180 )
	surface.DrawOutlinedRect( x+1, y+1, w-2, h-2 )
	surface.SetDrawColor( 120, 120, 195, 160 )
	surface.DrawOutlinedRect( x+2, y+2, w-4, h-4 )
	surface.SetDrawColor( 90, 90, 165, 140 )
	surface.DrawOutlinedRect( x+3, y+3, w-6, h-6 )
 
end
 
derma.DefineSkin( "bluelined", "Fun little skin, fading blue lines at edges.", SKIN )
 
OutputN/A


Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox