|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.badlogic.gdx.input.GestureDetector.GestureAdapter
public static class GestureDetector.GestureAdapter
Derrive from this if you only want to implement a subset of GestureDetector.GestureListener
.
Constructor Summary | |
---|---|
GestureDetector.GestureAdapter()
|
Method Summary | |
---|---|
boolean |
fling(float velocityX,
float velocityY,
int button)
Called when the user dragged a finger over the screen and lifted it. |
boolean |
longPress(float x,
float y)
|
boolean |
pan(float x,
float y,
float deltaX,
float deltaY)
Called when the user drags a finger over the screen. |
boolean |
pinch(Vector2 initialPointer1,
Vector2 initialPointer2,
Vector2 pointer1,
Vector2 pointer2)
Called when a user performs a pinch zoom gesture. |
boolean |
tap(float x,
float y,
int count,
int button)
Called when a tap occured. |
boolean |
touchDown(float x,
float y,
int pointer,
int button)
Called when a finger went down on the screen or a mouse button was pressed. |
boolean |
zoom(float initialDistance,
float distance)
Called when the user performs a pinch zoom gesture. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GestureDetector.GestureAdapter()
Method Detail |
---|
public boolean touchDown(float x, float y, int pointer, int button)
GestureDetector.GestureListener
touchDown
in interface GestureDetector.GestureListener
public boolean tap(float x, float y, int count, int button)
GestureDetector.GestureListener
GestureDetector
.
tap
in interface GestureDetector.GestureListener
count
- the number of taps.public boolean longPress(float x, float y)
longPress
in interface GestureDetector.GestureListener
public boolean fling(float velocityX, float velocityY, int button)
GestureDetector.GestureListener
fling
in interface GestureDetector.GestureListener
velocityX
- velocity on x in secondsvelocityY
- velocity on y in secondspublic boolean pan(float x, float y, float deltaX, float deltaY)
GestureDetector.GestureListener
pan
in interface GestureDetector.GestureListener
deltaX
- the difference in pixels to the last drag event on x.deltaY
- the difference in pixels to the last drag event on y.public boolean zoom(float initialDistance, float distance)
GestureDetector.GestureListener
zoom
in interface GestureDetector.GestureListener
initialDistance
- distance between fingers when the gesture started.distance
- current distance between fingers.public boolean pinch(Vector2 initialPointer1, Vector2 initialPointer2, Vector2 pointer1, Vector2 pointer2)
GestureDetector.GestureListener
pinch
in interface GestureDetector.GestureListener
|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |