Garry's Mod Wiki

derma.SkinTexture

  function derma.SkinTexture( string name, Panel pnl, function fallback = nil )

Description

Returns a function to draw a specified texture of panels skin.

These are usually generated via GWEN.CreateTextureBorder and similar.

Arguments

1 string name
The identifier of the texture
2 Panel pnl
Panel to get the skin of.
3 function or any fallback = nil
What to return if we failed to retrieve the texture

Returns

1 function
A function that is created with the GWEN library to draw a texture.
Function argument(s):
1 number x - X coordinate for the box.
2 number y - Y coordinate for the box.
3 number w - Width of the box.
4 number h - Height of the box.
5 table clr - Optional color, default is white. Uses the Color.