Enum Class GamepadButton

java.lang.Object
java.lang.Enum<GamepadButton>
org.openpatch.scratch.gamepad.GamepadButton
All Implemented Interfaces:
Serializable, Comparable<GamepadButton>, Constable

public enum GamepadButton extends Enum<GamepadButton>
A button of a gamepad, in Xbox positions. On a PlayStation controller, A is Cross, B is Circle, X is Square and Y is Triangle; the bumpers are L1 and R1.
  • Enum Constant Details

    • A

      public static final GamepadButton A
      The bottom face button (Cross on PlayStation).
    • B

      public static final GamepadButton B
      The right face button (Circle).
    • X

      public static final GamepadButton X
      The left face button (Square).
    • Y

      public static final GamepadButton Y
      The top face button (Triangle).
    • LEFT_BUMPER

      public static final GamepadButton LEFT_BUMPER
      The bumper above the left trigger (L1).
    • RIGHT_BUMPER

      public static final GamepadButton RIGHT_BUMPER
      The bumper above the right trigger (R1).
    • BACK

      public static final GamepadButton BACK
      The small button left of the middle (Share, View, Select).
    • START

      public static final GamepadButton START
      The small button right of the middle (Menu, Options, Start).
    • LEFT_STICK

      public static final GamepadButton LEFT_STICK
      Pressing the left stick into the pad (L3).
    • RIGHT_STICK

      public static final GamepadButton RIGHT_STICK
      Pressing the right stick into the pad (R3).
    • DPAD_UP

      public static final GamepadButton DPAD_UP
      The up direction of the direction pad.
    • DPAD_RIGHT

      public static final GamepadButton DPAD_RIGHT
      The right direction of the direction pad.
    • DPAD_DOWN

      public static final GamepadButton DPAD_DOWN
      The down direction of the direction pad.
    • DPAD_LEFT

      public static final GamepadButton DPAD_LEFT
      The left direction of the direction pad.
  • Method Details

    • values

      public static GamepadButton[] 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 GamepadButton 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