Header menu logo Mibo

MonoGameProgram Module

MonoGame-specific Program builder extensions.

Functions and values

Function or value Description

withInputMapper initialMap program

Full Usage: withInputMapper initialMap program

Parameters:
Returns: Program<'Model, 'Msg>

Configures the game to register an IInputMapper service backed by MonoGame's polling API.

This registers IInput automatically (equivalent to Program.withInput).

The mapper is registered as a service via a Program.ServiceRegistrations callback that MiboGame runs before Init, so the Core Program type does not reference the MonoGame factory directly.

If you want to stay fully "Elmish" (no service access), consider using InputMapper.subscribe instead and handle a single message.

initialMap : InputMap<'Action>
program : Program<'Model, 'Msg>
Returns: Program<'Model, 'Msg>
Example

 program |> MonoGameProgram.withInputMapper inputMap

Type something to start searching.