Garry's Mod Wiki

Panel:SizeTo

  Panel:SizeTo( number sizeW = 0, number sizeH = 0, number time, number delay = 0, number ease = -1, function callback = nil )

Description

Uses animation to resize the panel to the specified size.

Arguments

1 number sizeW = 0
The target width of the panel. Use -1 to retain the current width.
2 number sizeH = 0
The target height of the panel. Use -1 to retain the current height.
3 number time
The time to perform the animation within.
4 number delay = 0
The delay before the animation starts.
5 number ease = -1
Easing of the start and/or end speed of the animation. See Panel:NewAnimation for how this works.
6 function callback = nil
The function to be called once the animation finishes.
Function argument(s):
1 table animData - The AnimationData structure that was used.
2 Panel targetPanel - The panel object that was animated.