Garry's Mod Wiki

GWEN

GWEN is a system that allows you to load a spritesheet and generate a skin out of it.

Methods

function GWEN.CreateTextureBorder( number x, number y, number w, number h, number left, number top, number right, number bottom, IMaterial source = nil )
Used in derma skins to create a bordered rectangle drawing function from an image. The texture is taken either from last argument or from SKIN. GwenTexture when material source it's not supplied
function GWEN.CreateTextureCentered( number x, number y, number w, number h, IMaterial mat_override = null )
Used in derma skins to create a rectangle drawing function from an image. The rectangle will not be scaled, but instead it will be drawn in the center of the box. The texture is taken from SKIN. GwenTexture when mat_override it's not defined
function GWEN.CreateTextureNormal( number x, number y, number w, number h, IMaterial mat_override = null )
Used in derma skins to create a rectangle drawing function from an image. The texture of the rectangle will be scaled. The texture is taken from SKIN. GwenTexture when mat_override it's not supplied
table GWEN.TextureColor( number x, number y )
When used in a material skin, it returns a color value from a point in the skin image.