Header menu logo Mibo

MonoGameProgram<'Model, 'Msg> Type

MonoGame-specific wrapper around a Core Program, carrying device-level configuration that the backend-neutral Core type cannot hold.

Build one with MonoGameProgram.ofProgram, add MonoGame-specific configuration with MonoGameProgram.withConfig and/or MonoGameProgram.withInputMapper, then pass the result to MiboGame.

Example

 let program =
   Program.mkProgram init update
   |> Program.withConfig(fun cfg ->
       { cfg with Width = 1280; Height = 720; Title = "My Game" })
   |> Program.withInput
   |> Program.withTick Tick

 let mgProgram =
   program
   |> MonoGameProgram.ofProgram
   |> MonoGameProgram.withConfig(fun (game, graphics) ->
       graphics.SynchronizeWithVerticalRetrace <- false)

 use game = new MiboGame<_, _>(mgProgram)
 game.Run()
val program: obj
val mgProgram: obj
val game: obj

Record fields

Record Field Description

DeviceConfig

Full Usage: DeviceConfig

Field type: (Game * GraphicsDeviceManager -> unit) list

Device-level configuration callbacks invoked in the MiboGame constructor, after the Core Program.Config callbacks and before Initialize/GraphicsDevice creation.

Field type: (Game * GraphicsDeviceManager -> unit) list

Program

Full Usage: Program

Field type: Program<'Model, 'Msg>

The backend-neutral Core program.

Field type: Program<'Model, 'Msg>

Type something to start searching.