LavaUI docs GitHub

enum ClickCounter

Swift

enum ClickCounter

Multi-click detection. Kept here rather than in the field so any control can share one notion of what counts as a double click.

Sources/LavaUI/Focus.swift:577

Properties

static let interval: Double

Generous enough for a deliberate double click, tight enough that two separate clicks on the same spot are not merged.

Sources/LavaUI/Focus.swift:580

static let slop: Float

Farthest apart, in pixels, two clicks can land and still count as one multi-click.

Sources/LavaUI/Focus.swift:582

Methods

static func register(x: Float, y: Float) -> Int

Returns how many clicks this one continues (1 = single, 2 = double…).

Sources/LavaUI/Focus.swift:590