Header menu logo Mibo

RaylibProgram Module

Raylib-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 raylib's polling API.

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

The mapper is registered as a service via a Program.ServiceRegistrations callback that the runtime host runs before Init, so the Core Program type does not reference the raylib 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 |> RaylibProgram.withInputMapper inputMap

Type something to start searching.