|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.badlogic.gdx.scenes.scene2d.Event
com.badlogic.gdx.scenes.scene2d.InputEvent
public class InputEvent
Event for actor input: touch, mouse, keyboard, and scroll.
InputListener
Nested Class Summary | |
---|---|
static class |
InputEvent.Type
Types of low-level input events supported by stage2d. |
Constructor Summary | |
---|---|
InputEvent()
|
Method Summary | |
---|---|
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()
|
Methods inherited from class com.badlogic.gdx.scenes.scene2d.Event |
---|
cancel, getBubbles, getListenerActor, getStage, getTarget, handle, isCancelled, isCapture, isHandled, isStopped, setBubbles, setCapture, setListenerActor, setStage, setTarget, stop |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public InputEvent()
Method Detail |
---|
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()
.
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |