Garry's Mod Wiki

Revision Difference

Material:SetAlpha#511559

<function name="SetAlpha" parent="Material" type="panelfunc">⤶ <ispanel>yes</ispanel>⤶ <description>Sets the alpha value of the Material panel.</description>⤶ <realm>Client</realm>⤶ <args>⤶ <arg name="alpha" type="number">The alpha value, from 0 to 255.</arg>⤶ </args>⤶ </function>⤶ ⤶ <example>⤶ <description>Creates a transparent SWEP icon in the middle of the screen.</description>⤶ <code>⤶ local mat = vgui.Create("Material")⤶ mat:SetSize(200, 200)⤶ mat:Center()⤶ mat:SetMaterial("weapons/swep")⤶ ⤶ mat:SetAlpha(128)⤶ </code>⤶ <output></output>⤶ ⤶ </example>