protected static class CameraInputController.CameraGestureListener extends GestureDetector.GestureAdapter
Modifier and Type | Field and Description |
---|---|
CameraInputController |
controller |
Modifier | Constructor and Description |
---|---|
protected |
CameraGestureListener() |
Modifier and Type | Method and Description |
---|---|
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) |
boolean |
zoom(float initialDistance,
float distance)
Called when the user performs a pinch zoom gesture.
|
panStop, pinchStop
public CameraInputController controller
public boolean touchDown(float x, float y, int pointer, int button)
touchDown
in interface GestureDetector.GestureListener
touchDown
in class GestureDetector.GestureAdapter
InputProcessor.touchDown(int, int, int, int)
public boolean tap(float x, float y, int count, int button)
GestureDetector.GestureListener
GestureDetector
.tap
in interface GestureDetector.GestureListener
tap
in class GestureDetector.GestureAdapter
count
- the number of taps.public boolean longPress(float x, float y)
longPress
in interface GestureDetector.GestureListener
longPress
in class GestureDetector.GestureAdapter
public boolean fling(float velocityX, float velocityY, int button)
GestureDetector.GestureListener
fling
in interface GestureDetector.GestureListener
fling
in class GestureDetector.GestureAdapter
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
pan
in class GestureDetector.GestureAdapter
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
zoom
in class GestureDetector.GestureAdapter
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
pinch
in class GestureDetector.GestureAdapter