Garry's Mod Wiki

Material:SetAlpha

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:

Page Links


Special Pages


Wikis

?

Render Time: 101ms

DB GetPage 59
Generate Html 4
SaveChanges (1) 22
Render Body 0
Render Sidebar 13