Garry's Mod Wiki

Revision Difference

Panel:SetActionFunction#524478

<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 <page>Button</page> is clicked or the <page>Slider</page> value is changed. Arguments given are: * <page>Panel</page> self - The panel itself * <page>string</page> action - "Command" on button press, "SliderMoved" on slider move. * <page>number</page> val - The new value of the <page>Slider. Will always equal 0 for buttons.</page>⤶ * <page>number</page> val - The new value of the <page>Slider</page>. Will always equal 0 for buttons.* <page>number</page> zed - Always equals 0.</arg> </args> </function>