Struct GamePadButtons
A struct that represents the current button states for the controller.
public struct GamePadButtons
- Inherited Members
Constructors
GamePadButtons(Buttons)
Initializes a new instance of the GamePadButtons structure, setting the specified buttons to pressed in.
public GamePadButtons(Buttons buttons)
Parameters
buttons
ButtonsButtons to be set as pressed in.
Properties
A
Gets a value indicating if the button A is pressed.
public ButtonState A { get; }
Property Value
B
Gets a value indicating if the button B is pressed.
public ButtonState B { get; }
Property Value
Back
Gets a value indicating if the button Back is pressed.
public ButtonState Back { get; }
Property Value
BigButton
Gets a value indicating if the guide button is pressed.
public ButtonState BigButton { get; }
Property Value
- ButtonState
Pressed if the guide button is pressed; otherwise, Released.
LeftShoulder
Gets a value indicating if the left shoulder button is pressed.
public ButtonState LeftShoulder { get; }
Property Value
- ButtonState
Pressed if the left shoulder button is pressed; otherwise, Released.
LeftStick
Gets a value indicating if the left stick button is pressed.
public ButtonState LeftStick { get; }
Property Value
- ButtonState
Pressed if the left stick button is pressed; otherwise, Released.
RightShoulder
Gets a value indicating if the right shoulder button is pressed.
public ButtonState RightShoulder { get; }
Property Value
- ButtonState
Pressed if the right shoulder button is pressed; otherwise, Released.
RightStick
Gets a value indicating if the right stick button is pressed.
public ButtonState RightStick { get; }
Property Value
- ButtonState
Pressed if the right stick button is pressed; otherwise, Released.
Start
Gets a value indicating if the button Start is pressed.
public ButtonState Start { get; }
Property Value
- ButtonState
Pressed if the button Start is pressed; otherwise, Released.
X
Gets a value indicating if the button X is pressed.
public ButtonState X { get; }
Property Value
Y
Gets a value indicating if the button Y is pressed.
public ButtonState Y { 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
obj
objectAn object to compare to this instance.
Returns
- bool
true if
obj
is a GamePadButtons and has the same value as this instance; otherwise, false.
GetHashCode()
Serves as a hash function for a GamePadButtons 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 GamePadButtons.
public override string ToString()
Returns
- string
A string that represents the current GamePadButtons.
Operators
operator ==(GamePadButtons, GamePadButtons)
Determines whether two specified instances of GamePadButtons are equal.
public static bool operator ==(GamePadButtons left, GamePadButtons right)
Parameters
left
GamePadButtonsThe first object to compare.
right
GamePadButtonsThe second object to compare.
Returns
- bool
true if
left
andright
are equal; otherwise, false.
operator !=(GamePadButtons, GamePadButtons)
Determines whether two specified instances of GamePadButtons are not equal.
public static bool operator !=(GamePadButtons left, GamePadButtons right)
Parameters
left
GamePadButtonsThe first object to compare.
right
GamePadButtonsThe second object to compare.
Returns
- bool
true if
left
andright
are not equal; otherwise, false.