GestureController

class GestureController(input: Input, var tapWidth: Float = 20.0f, var tapHeight: Float = tapWidth, var tapCountInterval: Duration = 400.milliseconds, var longPressDuration: Duration = 1100.milliseconds, var maxFlingDuration: Duration = Duration.INFINITE, var processor: GestureProcessor) : InputProcessor

An InputProcessor that handles input events and emits gesture related events such as flinging, panning, zooming, and pinching and sends them to a GestureProcessor. Based off of libGDX GestureDetector.

Author

Colton Daily

Constructors

Link copied to clipboard
fun GestureController(input: Input, tapWidth: Float = 20.0f, tapHeight: Float = tapWidth, tapCountInterval: Duration = 400.milliseconds, longPressDuration: Duration = 1100.milliseconds, maxFlingDuration: Duration = Duration.INFINITE, setup: GestureProcessorBuilder.() -> Unit)
Link copied to clipboard
fun GestureController(input: Input, tapWidth: Float = 20.0f, tapHeight: Float = tapWidth, tapCountInterval: Duration = 400.milliseconds, longPressDuration: Duration = 1100.milliseconds, maxFlingDuration: Duration = Duration.INFINITE, processor: GestureProcessor)

Functions

Link copied to clipboard
fun cancel()
Link copied to clipboard
open fun charTyped(character: Char): Boolean

Invoked when a Key is pressed and a Char is associated with that key.

Link copied to clipboard
open fun gamepadButtonPressed(button: GameButton, pressure: Float, gamepad: Int): Boolean

Invoked when a GameButton is initially pressed on a GamepadInfo.

Link copied to clipboard
open fun gamepadButtonReleased(button: GameButton, gamepad: Int): Boolean

Invoked when a GameButton is released on a GamepadInfo.

Link copied to clipboard
open fun gamepadJoystickMoved(stick: GameStick, xAxis: Float, yAxis: Float, gamepad: Int): Boolean

Invoked when a GameStick is moved on a GamepadInfo.

Link copied to clipboard
open fun gamepadTriggerChanged(button: GameButton, pressure: Float, gamepad: Int): Boolean

Invoked when a GameButton that is considered a trigger is changed / moved.

Link copied to clipboard
open fun keyDown(key: Key): Boolean

Invoked when a Key is initially pressed down.

Link copied to clipboard
open fun keyRepeat(key: Key): Boolean

Invoked when a Key is pressed and held down.

Link copied to clipboard
open fun keyUp(key: Key): Boolean

Invoked when a Key is released.

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

Invoked when the mouse is moved.

Link copied to clipboard
open fun scrolled(amountX: Float, amountY: Float): Boolean

Invoked when the mouse is scrolled.

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

Invoked when a Pointer is initially touched or clicked. This includes mouse and touch.

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

Invoked when a Pointer is pressed/clicked and dragged. This includes mouse and touch.

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

Invoked when a Pointer is released. This includes mouse and touch.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var tapWidth: Float = 20.0f