From Warcraft Wiki
Jump to navigation Jump to search

Fires when a gamepad stick is moved.

OnGamePadStick: self, stick, x, y, len


string - The name of the stick that was moved.
number - The X coordinate of the stick, constrained between -1 and 1.
number - The Y coordinate of the stick, constrained between -1 and 1.
number - Represents the distance of the stick from its center point, constrained between 0 and 1.


  • Requires that the widget enable receipt of gamepad stick inputs. See Frame:EnableGamePadStick(enabled).
  • This handler will only be dispatched for the top-most frame that has enabled gamepad stick inputs.
  • A single stick may have multiple names, for example the left stick may dispatch two handlers for each movement with the names "LeftStick" and "Movement".
  • The deadzone configured for a stick is handled internally by the client; small movements from the resting position of the stick will not trigger this script handler until the deadzone has been exceeded.
  • The constraints applied to the payload coordinates are relative to the deadzone, such that any coordinate of 0 indicates the stick is within the deadzone for that axis.

Patch changes

External links