Enum Class Gamepad.Button

java.lang.Object
java.lang.Enum<Gamepad.Button>
org.wpilib.driverstation.Gamepad.Button
All Implemented Interfaces:
Serializable, Comparable<Gamepad.Button>, Constable
Enclosing class:
Gamepad

public static enum Gamepad.Button extends Enum<Gamepad.Button>
Represents a digital button on a Gamepad.
  • Enum Constant Details

    • FACE_DOWN

      public static final Gamepad.Button FACE_DOWN
      Face Down button.
    • FACE_RIGHT

      public static final Gamepad.Button FACE_RIGHT
      Face Right button.
    • FACE_LEFT

      public static final Gamepad.Button FACE_LEFT
      Face Left button.
    • FACE_UP

      public static final Gamepad.Button FACE_UP
      Face Up button.
    • BACK

      public static final Gamepad.Button BACK
      Back button.
    • GUIDE

      public static final Gamepad.Button GUIDE
      Guide button.
    • START

      public static final Gamepad.Button START
      Start button.
    • LEFT_STICK

      public static final Gamepad.Button LEFT_STICK
      Left stick button.
    • RIGHT_STICK

      public static final Gamepad.Button RIGHT_STICK
      Right stick button.
    • LEFT_BUMPER

      public static final Gamepad.Button LEFT_BUMPER
      Left bumper button.
    • RIGHT_BUMPER

      public static final Gamepad.Button RIGHT_BUMPER
      Right bumper button.
    • DPAD_UP

      public static final Gamepad.Button DPAD_UP
      D-pad up button.
    • DPAD_DOWN

      public static final Gamepad.Button DPAD_DOWN
      D-pad down button.
    • DPAD_LEFT

      public static final Gamepad.Button DPAD_LEFT
      D-pad left button.
    • DPAD_RIGHT

      public static final Gamepad.Button DPAD_RIGHT
      D-pad right button.
    • MISC_1

      public static final Gamepad.Button MISC_1
      Miscellaneous 1 button.
    • RIGHT_PADDLE_1

      public static final Gamepad.Button RIGHT_PADDLE_1
      Right Paddle 1 button.
    • LEFT_PADDLE_1

      public static final Gamepad.Button LEFT_PADDLE_1
      Left Paddle 1 button.
    • RIGHT_PADDLE_2

      public static final Gamepad.Button RIGHT_PADDLE_2
      Right Paddle 2 button.
    • LEFT_PADDLE_2

      public static final Gamepad.Button LEFT_PADDLE_2
      Left Paddle 2 button.
    • TOUCHPAD

      public static final Gamepad.Button TOUCHPAD
      Touchpad button.
    • MISC_2

      public static final Gamepad.Button MISC_2
      Miscellaneous 2 button.
    • MISC_3

      public static final Gamepad.Button MISC_3
      Miscellaneous 3 button.
    • MISC_4

      public static final Gamepad.Button MISC_4
      Miscellaneous 4 button.
    • MISC_5

      public static final Gamepad.Button MISC_5
      Miscellaneous 5 button.
    • MISC_6

      public static final Gamepad.Button MISC_6
      Miscellaneous 6 button.
  • Field Details

    • value

      public final int value
      Button value.
  • Method Details

    • values

      public static Gamepad.Button[] 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

      public static Gamepad.Button valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Get the human-friendly name of the button, matching the relevant methods.

      Primarily used for automated unit tests.

      Overrides:
      toString in class Enum<Gamepad.Button>
      Returns:
      the human-friendly name of the button.