Garry's Mod Wiki

Garry's Mod Wiki

  Material:SetAlpha( number alpha )

Description

Sets the alpha value of the Material panel.

Arguments

1 number alpha
The alpha value, from 0 to 255.

Example

Creates a transparent SWEP icon in the middle of the screen.

local mat = vgui.Create("Material") mat:SetSize(200, 200) mat:Center() mat:SetMaterial("weapons/swep") mat:SetAlpha(128)
Output:

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...