Derma Skins

I have made a custom derma skin, but I have no idea how to apply it. How do you change the skins?

I think that got removed a while ago, but if I’m wrong, make a folder in your addons called “derma” and place the file there, and name it “default”, that always worked for me in the past.

Or you could just use the Surface and Draw libraries to make it look better.

Works fine for me.

Use to force your skin.

Doesn’t work anymore.

You need to use panel:SetSkin() which is undocumented in the wiki, so I’ll go add that soon.
It has to be used on every panel that you want to apply the derma skin on.

Usage: mypanel:SetSkin(“MySkin”)

[editline]2nd December 2010[/editline]


There you go.

I wish they kept the force derma skin :(. Its annoying to have to set it each and every time a control is placed.

Use a custom VGUI panel.

I don’t know how to create a skin but I tried using:

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 )
derma.DefineSkin( "bluelined", "Fun little skin, fading blue lines at edges.", SKIN )

and putted the skin lua file in “lua/skins/”

and then i made my frame look like this:

	MainMenu = vgui.Create( "DFrame" )
		MainMenu:SetPos( ScrW( ) / 5.3,ScrH( ) / 5.6 )
		MainMenu:SetSize( 1000, 600 )
		MainMenu:SetTitle( "Welcome Menu" )
		MainMenu:SetBackgroundBlur( true )
		MainMenu:SetVisible( true )
		MainMenu:SetDraggable( false )
		MainMenu:ShowCloseButton( false )

but the menu doesn’t work :/…