Class GamepadEvent

java.lang.Object
java.util.EventObject
de.gurkenlabs.litiengine.input.GamepadEvent
All Implemented Interfaces:
Serializable

public class GamepadEvent extends EventObject
See Also:
  • Method Details

    • getValue

      public float getValue()
      Gets the data from the last time the component has been polled. If this axis is a button, the value returned will be either 0.0f or 1.0f. If this axis is normalized, the value returned will be between -1.0f and 1.0f.
      Returns:
      The last poll value of the component of this event.
    • getComponentId

      public String getComponentId()
      Gets the identifier of the component that caused this event.
      Returns:
      The identifier of the component.
    • getComponentName

      public String getComponentName()
      Gets the name of the component that caused this event.
      Returns:
      The human-readable name of the component.
    • getGamepad

      public Gamepad getGamepad()
      Gets the gamepad that caused the event.
      Returns:
      The gamepad of this event.
    • isRelative

      public boolean isRelative()
      Returns true if data returned from poll is relative to the last call, or false if data is absolute.
      Returns:
      True if the data is relative; otherwise false.
    • isAnalog

      public boolean isAnalog()
      Returns whether or not the axis is analog, or false if it is digital.
      Returns:
      True if the component is analog; otherwise false.