Class

GCControllerDirectionPad

A GCControllerDirectionPad object represents a two-dimensional control such as a directional pad or a thumbstick. This element does not provide values of its own. Instead, its values are provided by its child elements. It provides two sets of children that map to the same physical controls, so your app can view the directional pad as either either a pair of axis elements (horizontal, vertical), or four button elements (up, down, left, right).

Symbols

Reading the Directional Pad as a Pair of Axes

var xAxis: GCControllerAxisInput

The value of the directional pad along the horizontal axis (left and right).

var yAxis: GCControllerAxisInput

The value of the directional pad along the vertical axis (up and down).

Reading the Directional Pad as a Four Directional Buttons

var up: GCControllerButtonInput

A measurement of how far up the directional pad has been moved.

var down: GCControllerButtonInput

A measurement of how far down the directional pad has been moved.

var left: GCControllerButtonInput

A measurement of how far left the directional pad has been moved.

var right: GCControllerButtonInput

A measurement of how far right the directional pad has been moved.

Receiving Notifications When the Directional Pad’s Values Change

var valueChangedHandler: GCControllerDirectionPadValueChangedHandler?

A handler to be called when the directional pad element changes values.

Constants

GCControllerDirectionPadValueChangedHandler

Signature for the block executed when either axis changes values.

Relationships

Inherits From