GestureProcessor

An interface that handles gesture events.

See GestureController for subscribing to an InputProcessor that emits gesture events.

Author

Colton Daily

Functions

Link copied to clipboard
open fun fling(velocityX: Float, velocityY: Float, pointer: Pointer): Boolean

Triggered when a user "flings" the screen by dragging and lifting their pointer. Reports last velocity in pixels per second.

Link copied to clipboard
open fun longPress(screenX: Float, screenY: Float): Boolean

Triggered when a touch is pressed for a certain duration to be considered a long press.

Link copied to clipboard
open fun pan(screenX: Float, screenY: Float, dx: Float, dy: Float): Boolean

Triggered when a pointer is dragged over the screen.

Link copied to clipboard
open fun panStop(screenX: Float, screenY: Float, pointer: Pointer): Boolean

Triggered when panning is finished.

Link copied to clipboard
open fun pinch(initialPos1: Vec2f, initialPos2: Vec2f, pos1: Vec2f, pos2: Vec2f): Boolean

Triggered when two pointers perform a pinch gesture.

Link copied to clipboard
open fun pinchStop()

Triggered when pinching is finished

Link copied to clipboard
open fun tap(screenX: Float, screenY: Float, count: Int, pointer: Pointer): Boolean

Triggered whe na tap occurred. A tap occurs when a pointer touches and lets go of the same area of the screen without moving outside the tap zone. The tap zone is a rectangular area around the initial tap position.

Link copied to clipboard
open fun touchDown(screenX: Float, screenY: Float, pointer: Pointer): Boolean

Triggered when a pointer touches the screen.

Link copied to clipboard
open fun zoom(initialDistance: Float, distance: Float): Boolean

Triggered when two pointers perform a pinch zoom gesture.

Inheritors

Link copied to clipboard