Wowpedia
Advertisement

Fires when a gamepad stick is moved.

OnGamePadStick: stick, x, y, len

Payload

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

Details

  • 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

GitHub


Advertisement