Material/SetAlpha

From Garry's Mod
Jump to: navigation, search
 Material:SetAlpha( )

Contents

DescriptionPanelFunc

Sets the alpha value of the Material panel.

Arguments

number alpha

The alpha value, from 0 to 255.

Examples

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:



Material SetAlpha example1.jpg
Personal tools
Navigation