Package arc.input
Class InputEventQueue
java.lang.Object
arc.input.InputEventQueue
- All Implemented Interfaces:
InputProcessor
Queues events that are later passed to the wrapped
InputProcessor
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
drain()
long
boolean
Called when a key was pressedboolean
keyTyped
(char character) Called when a key was typedboolean
Called when a key was releasedboolean
mouseMoved
(int screenX, int screenY) boolean
scrolled
(float amountX, float amountY) Called when the mouse wheel was scrolled.void
setProcessor
(InputProcessor processor) boolean
boolean
touchDragged
(int screenX, int screenY, int pointer) Called when a finger or the mouse was dragged.boolean
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface arc.input.InputProcessor
connected, disconnected
-
Constructor Details
-
InputEventQueue
public InputEventQueue() -
InputEventQueue
-
-
Method Details
-
getProcessor
-
setProcessor
-
drain
public void drain() -
keyDown
Description copied from interface:InputProcessor
Called when a key was pressed- Specified by:
keyDown
in interfaceInputProcessor
- Returns:
- whether the input was processed
-
keyUp
Description copied from interface:InputProcessor
Called when a key was released- Specified by:
keyUp
in interfaceInputProcessor
- Returns:
- whether the input was processed
-
keyTyped
public boolean keyTyped(char character) Description copied from interface:InputProcessor
Called when a key was typed- Specified by:
keyTyped
in interfaceInputProcessor
- Parameters:
character
- The character- Returns:
- whether the input was processed
-
touchDown
- Specified by:
touchDown
in interfaceInputProcessor
- Parameters:
screenX
- The x coordinate, origin is in the upper left cornerscreenY
- The y coordinate, origin is in the upper left cornerpointer
- the pointer for the event.button
- the button- Returns:
- whether the input was processed
-
touchUp
- Specified by:
touchUp
in interfaceInputProcessor
pointer
- the pointer for the event.button
- the button- Returns:
- whether the input was processed
-
touchDragged
public boolean touchDragged(int screenX, int screenY, int pointer) Description copied from interface:InputProcessor
Called when a finger or the mouse was dragged.- Specified by:
touchDragged
in interfaceInputProcessor
pointer
- the pointer for the event.- Returns:
- whether the input was processed
-
mouseMoved
public boolean mouseMoved(int screenX, int screenY) - Specified by:
mouseMoved
in interfaceInputProcessor
- Returns:
- whether the input was processed
-
scrolled
public boolean scrolled(float amountX, float amountY) Description copied from interface:InputProcessor
Called when the mouse wheel was scrolled. Will not be called on iOS.- Specified by:
scrolled
in interfaceInputProcessor
- Parameters:
amountX
- the horizontal scroll amount, negative or positive depending on the direction the wheel was scrolled.amountY
- the vertical scroll amount, negative or positive depending on the direction the wheel was scrolled.- Returns:
- whether the input was processed.
-
getCurrentEventTime
public long getCurrentEventTime()
-