Show / Hide Table of Contents

Struct GamePadState

Describes the current state of a GamePad device.

Implements
IEquatable<GamePadState>
Inherited Members
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetType()
Namespace: OpenTK.Input
Assembly: OpenTK.dll
Syntax
public struct GamePadState : IEquatable<GamePadState>

Properties

Buttons

Gets a GamePadButtons structure describing the state of the GamePad buttons.

Declaration
public readonly GamePadButtons Buttons { get; }
Property Value
Type Description
GamePadButtons

DPad

Gets a GamePadDPad structure describing the state of the GamePad directional pad.

Declaration
public readonly GamePadDPad DPad { get; }
Property Value
Type Description
GamePadDPad

IsConnected

Gets a value indicating whether this GamePad instance is connected.

Declaration
public bool IsConnected { get; }
Property Value
Type Description
Boolean

true if this instance is connected; otherwise, false.

PacketNumber

Gets the packet number for this GamePadState instance. Use the packet number to determine whether the state of a GamePad device has changed.

Declaration
public int PacketNumber { get; }
Property Value
Type Description
Int32

ThumbSticks

Gets a GamePadThumbSticks structure describing the state of the GamePad thumb sticks.

Declaration
public readonly GamePadThumbSticks ThumbSticks { get; }
Property Value
Type Description
GamePadThumbSticks

Triggers

Gets a GamePadTriggers structure describing the state of the GamePad triggers.

Declaration
public readonly GamePadTriggers Triggers { get; }
Property Value
Type Description
GamePadTriggers

Methods

Equals(GamePadState)

Determines whether the specified GamePadState is equal to the current GamePadState.

Declaration
public bool Equals(GamePadState other)
Parameters
Type Name Description
GamePadState other

The GamePadState to compare with the current GamePadState.

Returns
Type Description
Boolean

true if the specified GamePadState is equal to the current GamePadState; otherwise, false.

Equals(Object)

Determines whether the specified Object is equal to the current GamePadState.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
Object obj

The Object to compare with the current GamePadState.

Returns
Type Description
Boolean

true if the specified Object is equal to the current GamePadState; otherwise, false.

Overrides
ValueType.Equals(Object)

GetHashCode()

Serves as a hash function for a GamePadState object.

Declaration
public override int GetHashCode()
Returns
Type Description
Int32

A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a hash table.

Overrides
ValueType.GetHashCode()

ToString()

Returns a String that represents the current GamePadState.

Declaration
public override string ToString()
Returns
Type Description
String

A String that represents the current GamePadState.

Overrides
ValueType.ToString()

Implements

System.IEquatable<T>
In This Article
Back to top Generated by DocFX