Enum Class Gamepad.Button
- All Implemented Interfaces:
Serializable, Comparable<Gamepad.Button>, Constable
- Enclosing class:
Gamepad
Represents a digital button on a Gamepad.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionBack button.D-pad down button.D-pad left button.D-pad right button.D-pad up button.East Face button.Guide button.Left bumper button.Left Paddle 1 button.Left Paddle 2 button.Left stick button.Miscellaneous 1 button.Miscellaneous 2 button.Miscellaneous 3 button.Miscellaneous 4 button.Miscellaneous 5 button.Miscellaneous 6 button.North Face button.Right bumper button.Right Paddle 1 button.Right Paddle 2 button.Right stick button.South Face button.Start button.Touchpad button.West Face button. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiontoString()Get the human-friendly name of the button, matching the relevant methods.static Gamepad.ButtonReturns the enum constant of this class with the specified name.static Gamepad.Button[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
kSouthFace
South Face button. -
kEastFace
East Face button. -
kWestFace
West Face button. -
kNorthFace
North Face button. -
kBack
Back button. -
kGuide
Guide button. -
kStart
Start button. -
kLeftStick
Left stick button. -
kRightStick
Right stick button. -
kLeftBumper
Left bumper button. -
kRightBumper
Right bumper button. -
kDpadUp
D-pad up button. -
kDpadDown
D-pad down button. -
kDpadLeft
D-pad left button. -
kDpadRight
D-pad right button. -
kMisc1
Miscellaneous 1 button. -
kRightPaddle1
Right Paddle 1 button. -
kLeftPaddle1
Left Paddle 1 button. -
kRightPaddle2
Right Paddle 2 button. -
kLeftPaddle2
Left Paddle 2 button. -
kTouchpad
Touchpad button. -
kMisc2
Miscellaneous 2 button. -
kMisc3
Miscellaneous 3 button. -
kMisc4
Miscellaneous 4 button. -
kMisc5
Miscellaneous 5 button. -
kMisc6
Miscellaneous 6 button.
-
-
Field Details
-
value
Button value.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
toString
Get the human-friendly name of the button, matching the relevant methods. This is done by stripping the leading `k`, and appending `Button`.Primarily used for automated unit tests.
- Overrides:
toStringin classEnum<Gamepad.Button>- Returns:
- the human-friendly name of the button.
-