Show / Hide Table of Contents

Struct GamePadButtons

Describes the ButtonState of GamePad Buttons.

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

Constructors

GamePadButtons(Buttons)

Initializes a new instance of the GamePadButtons structure.

Declaration
public GamePadButtons(Buttons state)
Parameters
Type Name Description
Buttons state

A bitmask containing the button state.

Properties

A

Gets the ButtonState for the A button.

Declaration
public readonly ButtonState A { get; }
Property Value
Type Description
ButtonState

B

Gets the ButtonState for the B button.

Declaration
public readonly ButtonState B { get; }
Property Value
Type Description
ButtonState

Back

Gets the ButtonState for the Back button.

Declaration
public readonly ButtonState Back { get; }
Property Value
Type Description
ButtonState

BigButton

Gets the ButtonState for the big button. This button is also known as Home or Guide.

Declaration
public readonly ButtonState BigButton { get; }
Property Value
Type Description
ButtonState

IsAnyButtonPressed

Gets a value indicating whether any button is pressed.

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

true if any button is pressed; otherwise, false.

LeftShoulder

Gets the ButtonState for the left shoulder button.

Declaration
public readonly ButtonState LeftShoulder { get; }
Property Value
Type Description
ButtonState

LeftStick

Gets the ButtonState for the left stick button. This button represents a left stick that is pressed in.

Declaration
public readonly ButtonState LeftStick { get; }
Property Value
Type Description
ButtonState

RightShoulder

Gets the ButtonState for the right shoulder button.

Declaration
public readonly ButtonState RightShoulder { get; }
Property Value
Type Description
ButtonState

RightStick

Gets the ButtonState for the right stick button. This button represents a right stick that is pressed in.

Declaration
public readonly ButtonState RightStick { get; }
Property Value
Type Description
ButtonState

Start

Gets the ButtonState for the starth button.

Declaration
public readonly ButtonState Start { get; }
Property Value
Type Description
ButtonState

X

Gets the ButtonState for the X button.

Declaration
public readonly ButtonState X { get; }
Property Value
Type Description
ButtonState

Y

Gets the ButtonState for the Y button.

Declaration
public readonly ButtonState Y { get; }
Property Value
Type Description
ButtonState

Methods

Equals(GamePadButtons)

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

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

The GamePadButtons to compare with the current GamePadButtons.

Returns
Type Description
Boolean

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

Equals(Object)

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

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

The Object to compare with the current GamePadButtons.

Returns
Type Description
Boolean

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

Overrides
ValueType.Equals(Object)

GetHashCode()

Serves as a hash function for a GamePadButtons 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 GamePadButtons.

Declaration
public override string ToString()
Returns
Type Description
String

A String that represents the current GamePadButtons.

Overrides
ValueType.ToString()

Operators

Equality(GamePadButtons, GamePadButtons)

Declaration
public static bool operator ==(GamePadButtons left, GamePadButtons right)
Parameters
Type Name Description
GamePadButtons left

A GamePadButtons instance to test for equality.

GamePadButtons right

A GamePadButtons instance to test for equality.

Returns
Type Description
Boolean

Inequality(GamePadButtons, GamePadButtons)

Declaration
public static bool operator !=(GamePadButtons left, GamePadButtons right)
Parameters
Type Name Description
GamePadButtons left

A GamePadButtons instance to test for inequality.

GamePadButtons right

A GamePadButtons instance to test for inequality.

Returns
Type Description
Boolean

Implements

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