Panel/SetActionFunction

From Garry's Mod
Jump to: navigation, search
 Panel:SetActionFunction( )

Description

This feature is deprecated.
You should avoid using it as it may be removed in a future version.

Only used in deprecated Derma controls.

Used in Button to call a function when the button is clicked and in Slider when the value changes.

Arguments

function func

Function to call when the Button is clicked or the Slider value is changed.

Arguments given are:

  • Panel self - The panel itself
  • string action - "Command" on button press, "SliderMoved" on slider move.
  • number val - The new value of the Slider. Will always equal 0 for buttons.
  • number - Always equals 0.
Personal tools
Navigation