Package de.tum.cit.ase.editor.input
Class CanvasInputProcessor
java.lang.Object
com.badlogic.gdx.InputAdapter
de.tum.cit.ase.editor.input.CanvasInputProcessor
- All Implemented Interfaces:
com.badlogic.gdx.InputProcessor
,ShortcutAdapter
This class is responsible for processing input events on the canvas.
It extends the
InputAdapter
class and implements the ShortcutAdapter
interface.-
Field Summary
Fields inherited from interface de.tum.cit.ase.editor.input.ShortcutAdapter
pressedKeys
-
Constructor Summary
ConstructorDescriptionCanvasInputProcessor
(EditorCanvas editorCanvas) Constructs a CanvasInputProcessor object. -
Method Summary
Modifier and TypeMethodDescriptionboolean
keyDown
(int keycode) boolean
keyTyped
(char character) boolean
keyUp
(int keycode) boolean
mouseMoved
(int screenX, int screenY) boolean
scrolled
(float amountX, float amountY) boolean
touchDown
(int screenX, int screenY, int pointer, int button) boolean
touchDragged
(int screenX, int screenY, int pointer) boolean
touchUp
(int screenX, int screenY, int pointer, int button) Methods inherited from class com.badlogic.gdx.InputAdapter
touchCancelled
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.tum.cit.ase.editor.input.ShortcutAdapter
addKey, isShortcut, isShortcut, isShortcut, removeKey
-
Constructor Details
-
CanvasInputProcessor
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 interfacecom.badlogic.gdx.InputProcessor
- Overrides:
keyDown
in classcom.badlogic.gdx.InputAdapter
-
keyTyped
public boolean keyTyped(char character) - Specified by:
keyTyped
in interfacecom.badlogic.gdx.InputProcessor
- Overrides:
keyTyped
in classcom.badlogic.gdx.InputAdapter
-
keyUp
public boolean keyUp(int keycode) - Specified by:
keyUp
in interfacecom.badlogic.gdx.InputProcessor
- Overrides:
keyUp
in classcom.badlogic.gdx.InputAdapter
-
touchDown
public boolean touchDown(int screenX, int screenY, int pointer, int button) - Specified by:
touchDown
in interfacecom.badlogic.gdx.InputProcessor
- Overrides:
touchDown
in classcom.badlogic.gdx.InputAdapter
-
touchUp
public boolean touchUp(int screenX, int screenY, int pointer, int button) - Specified by:
touchUp
in interfacecom.badlogic.gdx.InputProcessor
- Overrides:
touchUp
in classcom.badlogic.gdx.InputAdapter
-
touchDragged
public boolean touchDragged(int screenX, int screenY, int pointer) - Specified by:
touchDragged
in interfacecom.badlogic.gdx.InputProcessor
- Overrides:
touchDragged
in classcom.badlogic.gdx.InputAdapter
-
mouseMoved
public boolean mouseMoved(int screenX, int screenY) - Specified by:
mouseMoved
in interfacecom.badlogic.gdx.InputProcessor
- Overrides:
mouseMoved
in classcom.badlogic.gdx.InputAdapter
-
scrolled
public boolean scrolled(float amountX, float amountY) - Specified by:
scrolled
in interfacecom.badlogic.gdx.InputProcessor
- Overrides:
scrolled
in classcom.badlogic.gdx.InputAdapter
-