Class InputListenerExtended

java.lang.Object
com.badlogic.gdx.scenes.scene2d.InputListener
com.prineside.tdi2.utils.InputListenerExtended
All Implemented Interfaces:
com.badlogic.gdx.scenes.scene2d.EventListener

public class InputListenerExtended extends com.badlogic.gdx.scenes.scene2d.InputListener
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    getMode(com.badlogic.gdx.scenes.scene2d.InputEvent.Type eventType)
     
    boolean
    handle(com.badlogic.gdx.scenes.scene2d.Event e)
    Try to handle the given event, if it is an InputEvent.
    setMode(com.badlogic.gdx.scenes.scene2d.InputEvent.Type eventType, int mode)
     

    Methods inherited from class com.badlogic.gdx.scenes.scene2d.InputListener

    enter, exit, keyDown, keyTyped, keyUp, mouseMoved, scrolled, touchDown, touchDragged, touchUp

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • InputListenerExtended

      public InputListenerExtended()
  • Method Details

    • setMode

      public InputListenerExtended setMode(com.badlogic.gdx.scenes.scene2d.InputEvent.Type eventType, int mode)
    • getMode

      public int getMode(com.badlogic.gdx.scenes.scene2d.InputEvent.Type eventType)
    • handle

      public boolean handle(com.badlogic.gdx.scenes.scene2d.Event e)
      Description copied from class: com.badlogic.gdx.scenes.scene2d.InputListener
      Try to handle the given event, if it is an InputEvent.

      If the input event is of type InputEvent.Type.touchDown and InputEvent.getTouchFocus() is true and InputListener.touchDown(InputEvent, float, float, int, int) returns true (indicating the event was handled) then this listener is added to the stage's touch focus so it will receive all touch dragged events until the next touch up event.

      Specified by:
      handle in interface com.badlogic.gdx.scenes.scene2d.EventListener
      Overrides:
      handle in class com.badlogic.gdx.scenes.scene2d.InputListener
      Returns:
      true if the event should be considered handled by scene2d.