Class InputEvent

java.lang.Object
arc.scene.event.SceneEvent
arc.scene.event.InputEvent
All Implemented Interfaces:
Pool.Poolable

public class InputEvent extends SceneEvent
Event for actor input: touch, mouse, keyboard, and scroll.
See Also:
  • Field Details

    • type

    • stageX

      public float stageX
    • stageY

      public float stageY
    • pointer

      public int pointer
    • scrollAmountX

      public float scrollAmountX
    • scrollAmountY

      public float scrollAmountY
    • keyCode

      public KeyCode keyCode
    • character

      public char character
    • relatedActor

      public Element relatedActor
  • Constructor Details

    • InputEvent

      public InputEvent()
  • Method Details

    • reset

      public void reset()
      Description copied from interface: Pool.Poolable
      Resets the object for reuse. Object references should be nulled and fields may be set to default values.
      Specified by:
      reset in interface Pool.Poolable
      Overrides:
      reset in class SceneEvent
    • toCoordinates

      public Vec2 toCoordinates(Element actor, Vec2 actorCoords)
      Sets actorCoords to this event's coordinates relative to the specified actor.
      Parameters:
      actorCoords - Output for resulting coordinates.
    • isTouchFocusCancel

      public boolean isTouchFocusCancel()
      Returns true of this event is a touchUp triggered by Scene.cancelTouchFocus().
    • toString

      public String toString()
      Overrides:
      toString in class Object