Garry's Mod Wiki

Panel:ColorTo

  Panel:ColorTo( table color, number length, number delay = 0, function callback = nil )

Description

Fades panels color to specified one.

The panel must have GetColor and SetColor functions for ColorTo to work.

Arguments

1 table color
The color to fade to
2 number length
Length of the animation
3 number delay = 0
Delay before start fading
4 function callback = nil
Function to execute when finished
Function argument(s):
1 table animData - The AnimationData structure that was used.
2 Panel targetPanel - The panel object that was animated.