Struct GamePadDPad
public struct GamePadDPad
- Inherited Members
Constructors
GamePadDPad(ButtonState, ButtonState, ButtonState, ButtonState)
Initializes a new instance of the GamePadDPad struct.
public GamePadDPad(ButtonState upValue, ButtonState downValue, ButtonState leftValue, ButtonState rightValue)
Parameters
upValueButtonStateCurrent state of directional pad up.
downValueButtonStateCurrent state of directional pad down.
leftValueButtonStateCurrent state of directional pad left.
rightValueButtonStateCurrent state of directional pad right.
Properties
Down
Gets a value indicating whether down is pressed on the directional pad.
public readonly ButtonState Down { get; }
Property Value
Left
Gets a value indicating whether left is pressed on the directional pad.
public readonly ButtonState Left { get; }
Property Value
Right
Gets a value indicating whether right is pressed on the directional pad.
public readonly ButtonState Right { get; }
Property Value
- ButtonState
Pressed if the right button is pressed; otherwise, Released.
Up
Gets a value indicating whether up is pressed on the directional pad.
public readonly ButtonState Up { get; }
Property Value
Methods
Equals(object)
Returns a value indicating whether this instance is equal to a specified object.
public override bool Equals(object obj)
Parameters
objobjectAn object to compare to this instance.
Returns
- bool
true if
objis a GamePadDPad and has the same value as this instance; otherwise, false.
GetHashCode()
Serves as a hash function for a GamePadDPad object.
public override int GetHashCode()
Returns
- int
A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a hash table.
ToString()
Returns a string that represents the current GamePadDPad in a format of 0000 where each number represents a boolean value of each respecting object property: Left, Up, Right, Down.
public override string ToString()
Returns
- string
A string that represents the current GamePadDPad.
Operators
operator ==(GamePadDPad, GamePadDPad)
Determines whether two specified instances of GamePadDPad are equal.
public static bool operator ==(GamePadDPad left, GamePadDPad right)
Parameters
leftGamePadDPadThe first object to compare.
rightGamePadDPadThe second object to compare.
Returns
- bool
true if
leftandrightare equal; otherwise, false.
operator !=(GamePadDPad, GamePadDPad)
Determines whether two specified instances of GamePadDPad are not equal.
public static bool operator !=(GamePadDPad left, GamePadDPad right)
Parameters
leftGamePadDPadThe first object to compare.
rightGamePadDPadThe second object to compare.
Returns
- bool
true if
leftandrightare not equal; otherwise, false.