|
libgdx API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.badlogic.gdx.InputMultiplexer
public class InputMultiplexer
An InputProcessor that delegates to an ordered list of other InputProcessors. Delegation for an event stops if a
processor returns true, which indicates that the event was handled.
| Constructor Summary | |
|---|---|
InputMultiplexer()
|
|
InputMultiplexer(InputProcessor... processors)
|
|
| Method Summary | |
|---|---|
void |
addProcessor(InputProcessor processor)
|
void |
addProcessor(int index,
InputProcessor processor)
|
void |
clear()
|
Array<InputProcessor> |
getProcessors()
|
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 |
void |
removeProcessor(InputProcessor processor)
|
void |
removeProcessor(int index)
|
boolean |
scrolled(int amount)
Called when the mouse wheel was scrolled. |
void |
setProcessors(Array<InputProcessor> processors)
|
int |
size()
|
boolean |
touchDown(int x,
int y,
int pointer,
int button)
Called when the screen was touched or a mouse button was pressed. |
boolean |
touchDragged(int x,
int y,
int pointer)
Called when a finger or the mouse was dragged. |
boolean |
touchMoved(int x,
int y)
Called when the mouse was moved without any buttons being pressed. |
boolean |
touchUp(int x,
int y,
int pointer,
int button)
Called when a finger was lifted or a mouse button was released. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InputMultiplexer()
public InputMultiplexer(InputProcessor... processors)
| Method Detail |
|---|
public void addProcessor(int index,
InputProcessor processor)
public void removeProcessor(int index)
public void addProcessor(InputProcessor processor)
public void removeProcessor(InputProcessor processor)
public int size()
public void clear()
public void setProcessors(Array<InputProcessor> processors)
public Array<InputProcessor> getProcessors()
public boolean keyDown(int keycode)
InputProcessor
keyDown in interface InputProcessorkeycode - one of the constants in Input.Keys
public boolean keyUp(int keycode)
InputProcessor
keyUp in interface InputProcessorkeycode - one of the constants in Input.Keys
public boolean keyTyped(char character)
InputProcessor
keyTyped in interface InputProcessorcharacter - The character
public boolean touchDown(int x,
int y,
int pointer,
int button)
InputProcessorInput.Buttons.LEFT on
Android.
touchDown in interface InputProcessorx - The x coordinate, origin is in the upper left cornery - The y coordinate, origin is in the upper left cornerpointer - the pointer for the event.button - the button
public boolean touchUp(int x,
int y,
int pointer,
int button)
InputProcessorInput.Buttons.LEFT on
Android.
touchUp in interface InputProcessorx - The x coordinatey - The y coordinatepointer - the pointer for the event.button - the button
public boolean touchDragged(int x,
int y,
int pointer)
InputProcessor
touchDragged in interface InputProcessorx - The x coordinatey - The y coordinatepointer - the pointer for the event.
public boolean touchMoved(int x,
int y)
InputProcessor
touchMoved in interface InputProcessorx - The x coordinatey - The y coordinate
public boolean scrolled(int amount)
InputProcessor
scrolled in interface InputProcessoramount - the scroll amount, -1 or 1 depending on the direction the wheel was scrolled.
|
libgdx API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||