Garry's Mod Wiki

Revision Difference

Panel:AlphaTo#517675

<function name="AlphaTo" parent="Panel" type="classfunc"> <description>Uses animation to transition the current alpha value of a panel to a new alpha, over a set period of time and after a specified delay.</description> <realm>Client</realm> <args> <arg name="alpha" type="number">The alpha value (0-255) to approach.</arg> <arg name="duration" type="number">The time in seconds it should take to reach the alpha.</arg> <arg name="delay" type="number" default="0">The delay before the animation starts.</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 whose alpha was changed.</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>Panel</page> pnl - The panel object whose alpha was changed.</arg>⤶ </args> </function>