Class Button

java.lang.Object
com.simsilica.lemur.input.Button
Direct Known Subclasses:
InputDevice.DeviceButton

public class Button extends Object
Represents a logical button input with an on/off state that can be used to map inputs to logical functions.
  • Field Details

    • MOUSE_BUTTON1

      public static final Button MOUSE_BUTTON1
    • MOUSE_BUTTON2

      public static final Button MOUSE_BUTTON2
    • MOUSE_BUTTON3

      public static final Button MOUSE_BUTTON3
    • JOYSTICK_BUTTON0

      public static final Button JOYSTICK_BUTTON0
    • JOYSTICK_BUTTON1

      public static final Button JOYSTICK_BUTTON1
    • JOYSTICK_BUTTON2

      public static final Button JOYSTICK_BUTTON2
    • JOYSTICK_BUTTON3

      public static final Button JOYSTICK_BUTTON3
    • JOYSTICK_BUTTON4

      public static final Button JOYSTICK_BUTTON4
    • JOYSTICK_BUTTON5

      public static final Button JOYSTICK_BUTTON5
    • JOYSTICK_BUTTON6

      public static final Button JOYSTICK_BUTTON6
    • JOYSTICK_BUTTON7

      public static final Button JOYSTICK_BUTTON7
    • JOYSTICK_BUTTON8

      public static final Button JOYSTICK_BUTTON8
    • JOYSTICK_BUTTON9

      public static final Button JOYSTICK_BUTTON9
    • JOYSTICK_BUTTON10

      public static final Button JOYSTICK_BUTTON10
    • JOYSTICK_BUTTON11

      public static final Button JOYSTICK_BUTTON11
    • JOYSTICK_BUTTON12

      public static final Button JOYSTICK_BUTTON12
    • JOYSTICK_BUTTON13

      public static final Button JOYSTICK_BUTTON13
    • JOYSTICK_BUTTON14

      public static final Button JOYSTICK_BUTTON14
    • JOYSTICK_BUTTON15

      public static final Button JOYSTICK_BUTTON15
    • JOYSTICK_START

      public static final Button JOYSTICK_START
    • JOYSTICK_SELECT

      public static final Button JOYSTICK_SELECT
    • JOYSTICK_LEFT1

      public static final Button JOYSTICK_LEFT1
    • JOYSTICK_LEFT2

      public static final Button JOYSTICK_LEFT2
    • JOYSTICK_LEFT3

      public static final Button JOYSTICK_LEFT3
    • JOYSTICK_RIGHT1

      public static final Button JOYSTICK_RIGHT1
    • JOYSTICK_RIGHT2

      public static final Button JOYSTICK_RIGHT2
    • JOYSTICK_RIGHT3

      public static final Button JOYSTICK_RIGHT3
  • Constructor Details

    • Button

      public Button(String id, String name)
      Creates a new button identifier with the specified logical ID and name. Typically user-code would not call this constructor but it's available for situations where a game controller exposes buttons that are not part of the predefined constants.
  • Method Details

    • getId

      public String getId()
      Returns the logical ID of this button.
    • getName

      public String getName()
      Returns the human-readable name of this button.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object