RuntimeUiInput

class RuntimeUiInput<K : Any>(bindings: Map<K, UiGameAction>, press: (K) -> Unit, release: (K) -> Unit) : AutoCloseable(source)

Execution-owner-confined forwarding gate for a fixed set of native bindings. Tracks at most bindings' size, releases before changing input session/policy or entering text editing, and never forwards consumed UI events. The adapter resolves actual remapped keys for each event and supplies only matching binding identities.

Constructors

Link copied to clipboard
constructor(bindings: Map<K, UiGameAction>, press: (K) -> Unit, release: (K) -> Unit)

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
fun configure(inputSession: UiSession?, policy: UiInputPolicy, editing: Boolean)

Updates the active input session and permissions, clearing prior press ownership before adapter callbacks.

Link copied to clipboard
fun event(matches: Collection<K>, down: Boolean, consumed: Boolean)

Forwards a physical key/button transition only to permitted bindings; release always clears a forwarded press. Repeated down notifications do not toggle or enqueue another press while that binding remains held.

Link copied to clipboard
fun reset()

Releases all forwarded inputs without changing configuration, including queued native clicks.