Class CanvasInputProcessor

java.lang.Object
com.badlogic.gdx.InputAdapter
de.tum.cit.ase.editor.input.CanvasInputProcessor
All Implemented Interfaces:
com.badlogic.gdx.InputProcessor, ShortcutAdapter

public class CanvasInputProcessor extends com.badlogic.gdx.InputAdapter implements ShortcutAdapter
This class is responsible for processing input events on the canvas. It extends the InputAdapter class and implements the ShortcutAdapter interface.
  • Constructor Details

    • CanvasInputProcessor

      public CanvasInputProcessor(EditorCanvas editorCanvas)
      Constructs a CanvasInputProcessor object.
      Parameters:
      editorCanvas - the canvas to associate with the input processor
  • Method Details

    • keyDown

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

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

      public boolean keyUp(int keycode)
      Specified by:
      keyUp in interface com.badlogic.gdx.InputProcessor
      Overrides:
      keyUp in class com.badlogic.gdx.InputAdapter
    • 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 com.badlogic.gdx.InputAdapter
    • 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 com.badlogic.gdx.InputAdapter
    • touchDragged

      public boolean touchDragged(int screenX, int screenY, int pointer)
      Specified by:
      touchDragged in interface com.badlogic.gdx.InputProcessor
      Overrides:
      touchDragged in class com.badlogic.gdx.InputAdapter
    • mouseMoved

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

      public boolean scrolled(float amountX, float amountY)
      Specified by:
      scrolled in interface com.badlogic.gdx.InputProcessor
      Overrides:
      scrolled in class com.badlogic.gdx.InputAdapter