Panel.ColorTo

From GMod Wiki

Jump to: navigation, search
Function
Syntax Panel:ColorTo( Color color, Number duration, Number delay )
Description:
Transitions the current color of a panel, to the new color 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.ColorTo]Panel.ColorTo [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]




Examples

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


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox