Garry's Mod Wiki

DAlphaBar

Description

A bar to select the opacity (alpha level) of a color.

Parent

Derives from DPanel.

Methods

table DAlphaBar:GetBarColor()
Returns the base color of the alpha bar. This is the color for which the alpha channel is being modified.
number DAlphaBar:GetValue()
Returns the alpha value of the alpha bar.
DAlphaBar:OnChange( number alpha )
Called when user changes the desired alpha value with the control.
DAlphaBar:SetBarColor( table clr )
Sets the base color of the alpha bar. This is the color for which the alpha channel is being modified.
DAlphaBar:SetValue( number alpha )
Sets the alpha value or the alpha bar.

Example

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( self, newvalue ) print( "DAlphaBar value changed to " .. newvalue ) end

Page Links


Special Pages


Wikis

?

Render Time: 34ms

DB GetPage 3
Generate Html 6
SaveChanges (1) 11
Render Body 0
Render Sidebar 11