Header menu logo Mibo

Input Module

Service accessors and the concrete IInput factory hook.

create stays backend-local (it polls the native API). The accessors here let user and framework code retrieve the registered IInput from a GameContext without referencing a backend.

Functions and values

Function or value Description

getService ctx

Full Usage: getService ctx

Parameters:
Returns: IInput

Gets the registered IInput service.

ctx : GameContext
Returns: IInput
Exception Thrown when no IInput is registered (use Program.withInput).

tryGetService ctx

Full Usage: tryGetService ctx

Parameters:
Returns: IInput voption

Attempts to get the registered IInput service.

ctx : GameContext
Returns: IInput voption

Type something to start searching.