From Garry's Mod
A bar to select the opacity (alpha level) of a color.
Inherits the following functions from DPanel and its parents up to 3 levels deep:
Creates a DAlphaBar and sets its value to 25%.
local DAlphaBar = vgui.Create( "DAlphaBar" ) DAlphaBar:SetPos( 20, 30 ) DAlphaBar:SetSize( 25, 125 ) DAlphaBar:SetValue( 0.25 ) DAlphaBar.OnChange = function( newvalue ) print( "DAlphaBar value changed to " .. newvalue ) end