Garry's Mod Wiki

Revision Difference

Panel:SizeTo#528156

<function name="SizeTo" parent="Panel" type="classfunc"> <description>Uses animation to resize the panel to the specified size.</description> <realm>Client</realm> <args> <arg name="sizeW" type="number" default="0">The target width of the panel. Use -1 to retain the current width.</arg> <arg name="sizeH" type="number" default="0">The target height of the panel. Use -1 to retain the current height.</arg> <arg name="time" type="number">The time to perform the animation within.</arg> <arg name="delay" type="number" default="0">The delay before the animation starts.</arg> <arg name="ease" type="number" default="-1">Easing of the start and/or end speed of the animation. See <page>Panel:NewAnimation</page> for how this works.</arg> <arg name="callback" type="function">The function to be called once the animation finishes. Arguments are: * <page>table</page> animData - The <page>AnimationData that was used.</page>⤶ * <page>table</page> animData - The <page>Structures/AnimationData</page> that was used.* <page>Panel</page> pnl - The panel object that was resized.</arg> </args> </function>