Garry's Mod Wiki

Revision Difference

Panel:SetActionFunction#511014

<function name="SetActionFunction" parent="Panel" type="classfunc">⤶ <description>⤶ <deprecated>Does nothing at all.</deprecated>⤶ ⤶ Used in <page>Button</page> to call a function when the button is clicked and in <page>Slider</page> when the value changes.⤶ </description>⤶ <realm>Client</realm>⤶ <args>⤶ <arg name="func" type="function">Function to call when the &lt;page&gt;Button&lt;/page&gt; is clicked or the &lt;page&gt;Slider&lt;/page&gt; value is changed.&#xA;&#xA;Arguments given are:&#xA;* &lt;page&gt;Panel&lt;/page&gt; self - The panel itself&#xA;* &lt;page&gt;string&lt;/page&gt; action - &quot;Command&quot; on button press, &quot;SliderMoved&quot; on slider move.&#xA;* &lt;page&gt;number&lt;/page&gt; val - The new value of the &lt;page&gt;Slider. Will always equal 0 for buttons.&lt;/page&gt;&#xA;* &lt;page&gt;number&lt;/page&gt; zed - Always equals 0.</arg>⤶ </args>⤶ </function>⤶ ⤶