Garry's Mod Wiki

Revision Difference

Panel:SizeTo#510822

<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 &lt;page&gt;Panel:NewAnimation&lt;/page&gt; for how this works.</arg>⤶ <arg name="callback" type="function">The function to be called once the animation finishes. Arguments are:&#xA;* &lt;page&gt;table&lt;/page&gt; animData - The &lt;page&gt;AnimationData that was used.&lt;/page&gt;&#xA;* &lt;page&gt;Panel&lt;/page&gt; pnl - The panel object that was resized.</arg>⤶ </args>⤶ </function>⤶ ⤶