public class InputAdapter extends java.lang.Object implements InputProcessor
InputProcessor. You can derive from this and only override what you are interested in.| Constructor and Description |
|---|
InputAdapter() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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.
|
public boolean keyDown(int keycode)
InputProcessorkeyDown in interface InputProcessorkeycode - one of the constants in Input.Keyspublic boolean keyUp(int keycode)
InputProcessorkeyUp in interface InputProcessorkeycode - one of the constants in Input.Keyspublic boolean keyTyped(char character)
InputProcessorkeyTyped in interface InputProcessorcharacter - The characterpublic boolean touchDown(int screenX,
int screenY,
int pointer,
int button)
InputProcessorInput.Buttons.LEFT on iOS.touchDown in interface InputProcessorscreenX - 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 buttonpublic boolean touchUp(int screenX,
int screenY,
int pointer,
int button)
InputProcessorInput.Buttons.LEFT on iOS.touchUp in interface InputProcessorpointer - the pointer for the event.button - the buttonpublic boolean touchDragged(int screenX,
int screenY,
int pointer)
InputProcessortouchDragged in interface InputProcessorpointer - the pointer for the event.public boolean mouseMoved(int screenX,
int screenY)
InputProcessormouseMoved in interface InputProcessorpublic boolean scrolled(int amount)
InputProcessorscrolled in interface InputProcessoramount - the scroll amount, -1 or 1 depending on the direction the wheel was scrolled.