Package com.prineside.tdi2.systems
Class InputSystem.MouseEventsInputProcessor
java.lang.Object
com.badlogic.gdx.InputAdapter
com.prineside.tdi2.systems.InputSystem.MouseEventsInputProcessor
- All Implemented Interfaces:
InputProcessor
- Enclosing class:
- InputSystem
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
keyDown
(int keycode) Called when a key was pressedboolean
mouseMoved
(int x, int y) Called when the mouse was moved without any buttons being pressed.boolean
touchDragged
(int screenX, int screenY, int pointer) Called when a finger or the mouse was dragged.boolean
touchUp
(int screenX, int screenY, int pointer, int button) Called when a finger was lifted or a mouse button was released.Methods inherited from class com.badlogic.gdx.InputAdapter
keyTyped, keyUp, scrolled, touchCancelled, touchDown
-
Constructor Details
-
MouseEventsInputProcessor
public MouseEventsInputProcessor()
-
-
Method Details
-
keyDown
public boolean keyDown(int keycode) Description copied from interface:com.badlogic.gdx.InputProcessor
Called when a key was pressed- Specified by:
keyDown
in interfaceInputProcessor
- Overrides:
keyDown
in classInputAdapter
- Parameters:
keycode
- one of the constants inInput.Keys
- Returns:
- whether the input was processed
-
touchDragged
public boolean touchDragged(int screenX, int screenY, int pointer) Description copied from interface:com.badlogic.gdx.InputProcessor
Called when a finger or the mouse was dragged.- Specified by:
touchDragged
in interfaceInputProcessor
- Overrides:
touchDragged
in classInputAdapter
pointer
- the pointer for the event.- Returns:
- whether the input was processed
-
mouseMoved
public boolean mouseMoved(int x, int y) Description copied from interface:com.badlogic.gdx.InputProcessor
Called when the mouse was moved without any buttons being pressed. Will not be called on iOS.- Specified by:
mouseMoved
in interfaceInputProcessor
- Overrides:
mouseMoved
in classInputAdapter
- Returns:
- whether the input was processed
-
touchUp
public boolean touchUp(int screenX, int screenY, int pointer, int button) Description copied from interface:com.badlogic.gdx.InputProcessor
Called when a finger was lifted or a mouse button was released. The button parameter will beInput.Buttons.LEFT
on iOS.- Specified by:
touchUp
in interfaceInputProcessor
- Overrides:
touchUp
in classInputAdapter
pointer
- the pointer for the event.button
- the button- Returns:
- whether the input was processed
-