|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.badlogic.gdx.InputProcessorQueue
public class InputProcessorQueue
Queues events that are later passed to the wrapped InputProcessor
.
Constructor Summary | |
---|---|
InputProcessorQueue()
|
|
InputProcessorQueue(InputProcessor processor)
|
Method Summary | |
---|---|
void |
drain()
|
long |
getCurrentEventTime()
|
InputProcessor |
getProcessor()
|
boolean |
keyDown(int keycode)
Called when a key was pressed |
boolean |
keyTyped(char character)
Called when a key was typed |
boolean |
keyUp(int keycode)
Called when a key was released |
boolean |
mouseMoved(int screenX,
int screenY)
Called when the mouse was moved without any buttons being pressed. |
boolean |
scrolled(int amount)
Called when the mouse wheel was scrolled. |
void |
setProcessor(InputProcessor processor)
|
boolean |
touchDown(int screenX,
int screenY,
int pointer,
int button)
Called when the screen was touched or a mouse button was 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 java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InputProcessorQueue()
public InputProcessorQueue(InputProcessor processor)
Method Detail |
---|
public void setProcessor(InputProcessor processor)
public InputProcessor getProcessor()
public void drain()
public boolean keyDown(int keycode)
InputProcessor
keyDown
in interface InputProcessor
keycode
- one of the constants in Input.Keys
public boolean keyUp(int keycode)
InputProcessor
keyUp
in interface InputProcessor
keycode
- one of the constants in Input.Keys
public boolean keyTyped(char character)
InputProcessor
keyTyped
in interface InputProcessor
character
- The character
public boolean touchDown(int screenX, int screenY, int pointer, int button)
InputProcessor
Input.Buttons.LEFT
on
Android and iOS.
touchDown
in interface InputProcessor
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
public boolean touchUp(int screenX, int screenY, int pointer, int button)
InputProcessor
Input.Buttons.LEFT
on Android
and iOS.
touchUp
in interface InputProcessor
pointer
- the pointer for the event.button
- the button
public boolean touchDragged(int screenX, int screenY, int pointer)
InputProcessor
touchDragged
in interface InputProcessor
pointer
- the pointer for the event.
public boolean mouseMoved(int screenX, int screenY)
InputProcessor
mouseMoved
in interface InputProcessor
public boolean scrolled(int amount)
InputProcessor
scrolled
in interface InputProcessor
amount
- the scroll amount, -1 or 1 depending on the direction the wheel was scrolled.
public long getCurrentEventTime()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |