Class InputDecorator

All Implemented Interfaces:
com.badlogic.gdx.input.GestureDetector.GestureListener, com.badlogic.gdx.InputProcessor

public class InputDecorator extends InputComponent
Generic class to wrap an InputProcessor so that it acts like an InputComponent. This was initially created to wrap the stage in, but can be used for any class that implements InputProcessor.
  • Constructor Details

    • InputDecorator

      public InputDecorator(com.badlogic.gdx.InputProcessor inputProcessor, int priority)
  • Method Details

    • keyDown

      public boolean keyDown(int keycode)
      Specified by:
      keyDown in interface com.badlogic.gdx.InputProcessor
      Overrides:
      keyDown in class InputComponent
      See Also:
      • InputProcessor.keyDown(int)
    • keyTyped

      public boolean keyTyped(char character)
      Specified by:
      keyTyped in interface com.badlogic.gdx.InputProcessor
      Overrides:
      keyTyped in class InputComponent
      See Also:
      • InputProcessor.keyTyped(char)
    • keyUp

      public boolean keyUp(int keycode)
      Specified by:
      keyUp in interface com.badlogic.gdx.InputProcessor
      Overrides:
      keyUp in class InputComponent
      See Also:
      • InputProcessor.keyUp(int)
    • mouseMoved

      public boolean mouseMoved(int screenX, int screenY)
      Specified by:
      mouseMoved in interface com.badlogic.gdx.InputProcessor
      Overrides:
      mouseMoved in class InputComponent
      See Also:
      • InputProcessor.mouseMoved(int, int)
    • scrolled

      public boolean scrolled(float amountX, float amountY)
      Specified by:
      scrolled in interface com.badlogic.gdx.InputProcessor
      Overrides:
      scrolled in class InputComponent
      See Also:
      • InputProcessor.scrolled(float, float)
    • touchDown

      public boolean touchDown(int screenX, int screenY, int pointer, int button)
      Specified by:
      touchDown in interface com.badlogic.gdx.InputProcessor
      Overrides:
      touchDown in class InputComponent
      See Also:
      • InputProcessor.touchDown(int, int, int, int)
    • touchDragged

      public boolean touchDragged(int screenX, int screenY, int pointer)
      Specified by:
      touchDragged in interface com.badlogic.gdx.InputProcessor
      Overrides:
      touchDragged in class InputComponent
      See Also:
      • InputProcessor.touchDragged(int, int, int)
    • touchUp

      public boolean touchUp(int screenX, int screenY, int pointer, int button)
      Specified by:
      touchUp in interface com.badlogic.gdx.InputProcessor
      Overrides:
      touchUp in class InputComponent
      See Also:
      • InputProcessor.touchUp(int, int, int, int)