InputListener
| Modifier and Type | Class and Description |
|---|---|
| public static enum | InputEvent.
Types of low-level input events supported by scene2d. |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private char | |
| private int | |
| private int | |
| private Actor | |
| private float | |
| private float | |
| private float | |
| private float | |
| private boolean | |
| private InputEvent. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public char | |
| public int | |
| public int | |
| public Actor | |
| public float | |
| public float | |
| public float | |
| public float | |
| public boolean | getTouchFocus()
If false, |
| public InputEvent. | |
| public boolean | |
| public void | reset()
Overrides com. Implements com. Resets the object for reuse. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public Vector2 | toCoordinates(Actor actor, Vector2
Output for resulting coordinates. actorCoords)Sets actorCoords to this event's coordinates relative to the specified actor. |
| public String |
| button | back to summary |
|---|---|
| private int button | |
| character | back to summary |
|---|---|
| private char character | |
| keyCode | back to summary |
|---|---|
| private int keyCode | |
| pointer | back to summary |
|---|---|
| private int pointer | |
| relatedActor | back to summary |
|---|---|
| private Actor relatedActor
| |
| scrollAmountX | back to summary |
|---|---|
| private float scrollAmountX | |
| scrollAmountY | back to summary |
|---|---|
| private float scrollAmountY | |
| stageX | back to summary |
|---|---|
| private float stageX | |
| stageY | back to summary |
|---|---|
| private float stageY | |
| touchFocus | back to summary |
|---|---|
| private boolean touchFocus | |
| type | back to summary |
|---|---|
| private InputEvent. | |
| InputEvent | back to summary |
|---|---|
| public InputEvent() | |
| getButton | back to summary |
|---|---|
| public int getButton() The index for the mouse button pressed. Always 0 on Android. Valid for: touchDown and touchUp.
| |
| getCharacter | back to summary |
|---|---|
| public char getCharacter() The character for the key that was typed. Valid for: keyTyped. | |
| getKeyCode | back to summary |
|---|---|
| public int getKeyCode() The key code of the key that was pressed. Valid for: keyDown and keyUp. | |
| getPointer | back to summary |
|---|---|
| public int getPointer() The pointer index for the event. The first touch is index 0, second touch is index 1, etc. On desktop it is always 0 for a touch, but -1 for enter/exit without a touch. Valid for: touchDown, touchDragged, touchUp, enter, and exit. | |
| getRelatedActor | back to summary |
|---|---|
| public Actor getRelatedActor() The actor related to the event. Valid for: enter and exit. For enter, this is the actor being exited, or null. For exit, this is the actor being entered, or null.
| |
| getScrollAmountX | back to summary |
|---|---|
| public float getScrollAmountX() The amount the mouse was scrolled horizontally. Valid for: scrolled. | |
| getScrollAmountY | back to summary |
|---|---|
| public float getScrollAmountY() The amount the mouse was scrolled vertically. Valid for: scrolled. | |
| getStageX | back to summary |
|---|---|
| public float getStageX() The stage x coordinate where the event occurred. Valid for: touchDown, touchDragged, touchUp, mouseMoved, enter, and exit. | |
| getStageY | back to summary |
|---|---|
| public float getStageY() The stage x coordinate where the event occurred. Valid for: touchDown, touchDragged, touchUp, mouseMoved, enter, and exit. | |
| getTouchFocus | back to summary |
|---|---|
| public boolean getTouchFocus() If false, | |
| getType | back to summary |
|---|---|
| public InputEvent. The type of input event. | |
| isTouchFocusCancel | back to summary |
|---|---|
| public boolean isTouchFocusCancel() Returns true if this event is a touchUp triggered by | |
| reset | back to summary |
|---|---|
| public void reset() Overrides com. Implements com. Doc from com. Resets the object for reuse. Object references should be nulled and fields may be set to default values. | |
| setButton | back to summary |
|---|---|
| public void setButton(int button) | |
| setCharacter | back to summary |
|---|---|
| public void setCharacter(char character) | |
| setKeyCode | back to summary |
|---|---|
| public void setKeyCode(int keyCode) | |
| setPointer | back to summary |
|---|---|
| public void setPointer(int pointer) | |
| setRelatedActor | back to summary |
|---|---|
public void setRelatedActor(Actor relatedActor)
| |
| setScrollAmountX | back to summary |
|---|---|
| public void setScrollAmountX(float scrollAmount) | |
| setScrollAmountY | back to summary |
|---|---|
| public void setScrollAmountY(float scrollAmount) | |
| setStageX | back to summary |
|---|---|
| public void setStageX(float stageX) | |
| setStageY | back to summary |
|---|---|
| public void setStageY(float stageY) | |
| setTouchFocus | back to summary |
|---|---|
| public void setTouchFocus(boolean touchFocus) | |
| setType | back to summary |
|---|---|
| public void setType(InputEvent. | |
| toCoordinates | back to summary |
|---|---|
| public Vector2 toCoordinates(Actor actor, Vector2 actorCoords) Sets actorCoords to this event's coordinates relative to the specified actor.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| Modifier and Type | Field and Description |
|---|---|
| public static final InputEvent. | |
| public static final InputEvent. | exit
The mouse pointer or an active touch have exited an actor. |
| public static final InputEvent. | keyDown
A keyboard key has been pressed. |
| public static final InputEvent. | keyTyped
A keyboard key has been pressed and released. |
| public static final InputEvent. | keyUp
A keyboard key has been released. |
| public static final InputEvent. | mouseMoved
The mouse pointer has moved (without a mouse button being active). |
| public static final InputEvent. | scrolled
The mouse scroll wheel has changed. |
| public static final InputEvent. | touchDown
A new touch for a pointer on the stage was detected |
| public static final InputEvent. | touchDragged
A pointer that is touching the stage has moved. |
| public static final InputEvent. | touchUp
A pointer has stopped touching the stage. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static InputEvent. | |
| public static InputEvent. |
| enter | back to summary |
|---|---|
| public static final InputEvent. The mouse pointer or an active touch have entered (i.e., | |
| exit | back to summary |
|---|---|
| public static final InputEvent. The mouse pointer or an active touch have exited an actor. | |
| keyDown | back to summary |
|---|---|
| public static final InputEvent. A keyboard key has been pressed. | |
| keyTyped | back to summary |
|---|---|
| public static final InputEvent. A keyboard key has been pressed and released. | |
| keyUp | back to summary |
|---|---|
| public static final InputEvent. A keyboard key has been released. | |
| mouseMoved | back to summary |
|---|---|
| public static final InputEvent. The mouse pointer has moved (without a mouse button being active). | |
| scrolled | back to summary |
|---|---|
| public static final InputEvent. The mouse scroll wheel has changed. | |
| touchDown | back to summary |
|---|---|
| public static final InputEvent. A new touch for a pointer on the stage was detected | |
| touchDragged | back to summary |
|---|---|
| public static final InputEvent. A pointer that is touching the stage has moved. | |
| touchUp | back to summary |
|---|---|
| public static final InputEvent. A pointer has stopped touching the stage. | |
| Type | back to summary |
|---|---|
| private Type() | |
| valueOf | back to summary |
|---|---|
| public static InputEvent. | |
| values | back to summary |
|---|---|
| public static InputEvent. | |