public interface GestureInterface
GestureDetector.GestureListener| Modifier and Type | Method and Description |
|---|---|
void |
onFling(float velocityX,
float velocityY,
int button)
Called when the user dragged a finger over the screen and lifted it.
|
void |
onLongPress(float x,
float y)
Called on long press on Android.
|
void |
onPan(float x,
float y,
float deltaX,
float deltaY)
Called when the user drags a finger over the screen on Android.
|
void |
onPinch(Vector2 initialPointer1,
Vector2 initialPointer2,
Vector2 pointer1,
Vector2 pointer2)
Called when a user performs a pinch zoom gesture on Android.
|
void |
onTap(float x,
float y,
int count,
int button)
Invoked for a tap gesture on Android.
|
void |
onZoom(float initialDistance,
float distance)
Called when the user performs a pinch zoom gesture on Android.
|
void onZoom(float initialDistance,
float distance)
initialDistance - distance between fingers when the gesture starteddistance - current distance between fingersvoid onTap(float x,
float y,
int count,
int button)
x - the screen X coordinate (origin is the lower left corner)y - the screen Y coordinate (origin is the lower left corner)count - the number of tapsbutton - Input.Buttons.LEFT or
Input.Buttons.RIGHT button clickedvoid onPinch(Vector2 initialPointer1, Vector2 initialPointer2, Vector2 pointer1, Vector2 pointer2)
initialPointer1 - finger 1 initial positioninitialPointer2 - finger 2 initial positionpointer1 - finger 1 current positionpointer2 - finger 2 current positionvoid onPan(float x,
float y,
float deltaX,
float deltaY)
x - the screen X coordinate (origin is the lower left corner)y - the screen Y coordinate (origin is the lower left corner)deltaX - the difference in pixels to the last drag event on xdeltaY - the difference in pixels to the last drag event on yvoid onLongPress(float x,
float y)
x - the screen X coordinate (origin is the lower left corner)y - the screen Y coordinate (origin is the lower left corner)void onFling(float velocityX,
float velocityY,
int button)
velocityX - velocity on the X axis in secondsvelocityY - velocity on the Y axis in secondsbutton - Input.Buttons.LEFT or
Input.Buttons.RIGHT button clickedCopyright © 2014-2016 gdx2d - https://github.com/hevs-isi/gdx2d