Sdílet prostřednictvím


GamepadReading Struct

Definition

Represents the current state of the gamepad.

public value class GamepadReading
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
struct GamepadReading
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public struct GamepadReading
var gamepadReading = {
timestamp : /* Your value */,
buttons : /* Your value */,
leftTrigger : /* Your value */,
rightTrigger : /* Your value */,
leftThumbstickX : /* Your value */,
leftThumbstickY : /* Your value */,
rightThumbstickX : /* Your value */,
rightThumbstickY : /* Your value */
}
Public Structure GamepadReading
Inheritance
GamepadReading
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Fields

Buttons

The state of the gamepad's buttons. This will be a combination of values in the GamepadButtons enumeration.

LeftThumbstickX

The position of the left thumbstick on the X-axis. The value is between -1.0 and 1.0.

LeftThumbstickY

The position of the left thumbstick on the Y-axis. The value is between -1.0 and 1.0.

LeftTrigger

The position of the left trigger. The value is between 0.0 (not depressed) and 1.0 (fully depressed).

RightThumbstickX

The position of the right thumbstick on the X-axis. The value is between -1.0 and 1.0.

RightThumbstickY

The position of the right thumbstick on the Y-axis. The value is between -1.0 and 1.0.

RightTrigger

The position of the right trigger. The value is between 0.0 (not depressed) and 1.0 (fully depressed).

Timestamp

Time when the state was retrieved from the gamepad.

Applies to