Panel.AlphaTo

From GMod Wiki

Jump to: navigation, search
Function
Syntax Panel:AlphaTo( Number Alpha, Number duration, Number delay )
Description:
Transitions the current alpha of a panel, to the new alpha over a set period of time after a specified delay.
Returns: nil
In Object: Panel
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Panel.AlphaTo]Panel.AlphaTo [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]




Examples

DescriptionChanges the alpha of myPanel after 1 second, over a duration of 4 seconds.
Used onNewerClient.png
Code
 
myPanel:AlphaTo(255, 4, 1)
 
OutputAfter 1 second has elapsed upon calling the function, myPanel will smoothly transition from its current alpha value to the new alpha over a time of 4 seconds smoothly.


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox