GestureConfig

class GestureConfig(val onTap: (TapEvent) -> Unit? = null, val onDrag: (DragEvent) -> Unit? = null, val onDragStart: (DragEvent) -> Unit? = null, val onDragEnd: () -> Unit? = null, val dragThreshold: Float = 8.0f)

Configuration for gesture handling within an isometric scene.

Supply callback lambdas for the gestures you want to handle; any callback left null is simply ignored. The enabled property returns true when at least one callback is registered. Use Disabled for a shared no-op instance.

Parameters

onTap

Called when the user taps the scene. The TapEvent includes screen coordinates and, when hit testing is active, the tapped IsometricNode.

onDrag

Called continuously as the user drags across the scene, providing the current DragEvent with screen coordinates.

onDragStart

Called once when a drag gesture is first recognised, providing the initial DragEvent with screen coordinates.

onDragEnd

Called once when the drag gesture finishes (finger lifted).

dragThreshold

Minimum distance in pixels the pointer must move before a drag is recognised. Must be non-negative. Defaults to 8f.

Constructors

Link copied to clipboard
constructor(onTap: (TapEvent) -> Unit? = null, onDrag: (DragEvent) -> Unit? = null, onDragStart: (DragEvent) -> Unit? = null, onDragEnd: () -> Unit? = null, dragThreshold: Float = 8.0f)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

true when at least one gesture callback is registered.

Link copied to clipboard
val onDrag: (DragEvent) -> Unit?
Link copied to clipboard
val onDragEnd: () -> Unit?
Link copied to clipboard
Link copied to clipboard
val onTap: (TapEvent) -> Unit?

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String