public class InputEvent extends Event
InputListener
Modifier and Type | Class and Description |
---|---|
static class |
InputEvent.Type
Types of low-level input events supported by scene2d.
|
Constructor and Description |
---|
InputEvent() |
Modifier and Type | Method and Description |
---|---|
int |
getButton()
The index for the mouse button pressed.
|
char |
getCharacter()
The character for the key that was type.
|
int |
getKeyCode()
The key code of the key that was pressed.
|
int |
getPointer()
The pointer index for the event.
|
Actor |
getRelatedActor()
The actor related to the event.
|
int |
getScrollAmount()
The amount the mouse was scrolled.
|
float |
getStageX()
The stage x coordinate where the event occurred.
|
float |
getStageY()
The stage x coordinate where the event occurred.
|
InputEvent.Type |
getType()
The type of input event.
|
boolean |
isTouchFocusCancel()
Returns true of this event is a touchUp triggered by
Stage.cancelTouchFocus() . |
void |
reset()
Resets the object for reuse.
|
void |
setButton(int button) |
void |
setCharacter(char character) |
void |
setKeyCode(int keyCode) |
void |
setPointer(int pointer) |
void |
setRelatedActor(Actor relatedActor) |
void |
setScrollAmount(int scrollAmount) |
void |
setStageX(float stageX) |
void |
setStageY(float stageY) |
void |
setType(InputEvent.Type type) |
Vector2 |
toCoordinates(Actor actor,
Vector2 actorCoords)
Sets actorCoords to this event's coordinates relative to the specified actor.
|
String |
toString() |
cancel, getBubbles, getListenerActor, getStage, getTarget, handle, isCancelled, isCapture, isHandled, isStopped, setBubbles, setCapture, setListenerActor, setStage, setTarget, stop
public void reset()
Pool.Poolable
reset
in interface Pool.Poolable
reset
in class Event
public float getStageX()
public void setStageX(float stageX)
public float getStageY()
public void setStageY(float stageY)
public InputEvent.Type getType()
public void setType(InputEvent.Type type)
public int getPointer()
public void setPointer(int pointer)
public int getButton()
Input.Buttons
public void setButton(int button)
public int getKeyCode()
public void setKeyCode(int keyCode)
public char getCharacter()
public void setCharacter(char character)
public int getScrollAmount()
public void setScrollAmount(int scrollAmount)
public Actor getRelatedActor()
public void setRelatedActor(Actor relatedActor)
relatedActor
- May be null.public Vector2 toCoordinates(Actor actor, Vector2 actorCoords)
actorCoords
- Output for resulting coordinates.public boolean isTouchFocusCancel()
Stage.cancelTouchFocus()
.Copyright © 2015. All rights reserved.