fsharp-gamecore-imgui 0.0.2

FSharp GameCore ImGui

Wrappers and helpers for ImGui.NET integration with FSharp-GameCore

Install-Package fsharp-gamecore-imgui -Version 0.0.2
dotnet add package fsharp-gamecore-imgui --version 0.0.2
paket add fsharp-gamecore-imgui --version 0.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

fsharp-gamecore-imgui

Integrates ImGui.NET into FSharp-Gamecore. ImGui.NET is an excellent project by mellinoe that wraps Dear ImGui by ocornut

This project provides a custom game loop class (easily runnable via the game runner method runImGuiGame) that includes an integrated XNA/Monogame renderer for ImGui invocations.

It requires a getUI method, given the last game state model and expected to return a list of uimodel -> uimodel functions that can be used to invoke ImGui methods (e.g. ImGui.Text "hello world"), optionally derived from a custom UI model and optionally updating the same model, which is then passed as an additional argument to the standard fsharp-gamecore advance model function.

In this way, a UI can be generated based on the game's last model state, and can provide a state for the next game state's construction.

Available on Nuget at: <https://www.nuget.org/packages/fsharp-gamecore-imgui/0.0.2>

Samples

Please see the the sample project for an example of use. There are a set of helpful wrapper methods in the Wrappers module, that provide functional invocation (and occasionally hide some nasty use of pointers) of common ImGui functions, e.g. Text, Rows, Inputs and Images.

For further examples of how ImGui can be used please see:

  • The ImGui.NET sample XNA project's sample app
  • The Dear ImGui's demo source code (generally trivial to translate the C to the equivalent F#, thanks to mellinoe's excellent wrapping library)

Use case

Dear ImGui is predominantly used to construct tooling, IDEs and similar - the base library does not provide the supreme level of customisation required for a fully bespoke game.

However, a good use case (which is what I use it for) is to create a mock UI while developing, to be swapped out with a bespoke UI at a later date. Dear ImGui/ImGui.NET is good for rapid prototyping in this fashin.

The UI design philosophy that Dear ImGui implements is an excellent fit for both Monogame/XNA/Gameloop centric games, and for F# in my opinion.

License

Provided under MIT. The default font for ImGui (Proggy, also under MIT) has been overridden by personal preference with Karla regular, one of the fonts shipped with Dear ImGui itself. Karla is under the SIL Open Font License.

fsharp-gamecore-imgui

Integrates ImGui.NET into FSharp-Gamecore. ImGui.NET is an excellent project by mellinoe that wraps Dear ImGui by ocornut

This project provides a custom game loop class (easily runnable via the game runner method runImGuiGame) that includes an integrated XNA/Monogame renderer for ImGui invocations.

It requires a getUI method, given the last game state model and expected to return a list of uimodel -&gt; uimodel functions that can be used to invoke ImGui methods (e.g. ImGui.Text &quot;hello world&quot;), optionally derived from a custom UI model and optionally updating the same model, which is then passed as an additional argument to the standard fsharp-gamecore advance model function.

In this way, a UI can be generated based on the game's last model state, and can provide a state for the next game state's construction.

Available on Nuget at: <https://www.nuget.org/packages/fsharp-gamecore-imgui/0.0.2>

Samples

Please see the the sample project for an example of use. There are a set of helpful wrapper methods in the Wrappers module, that provide functional invocation (and occasionally hide some nasty use of pointers) of common ImGui functions, e.g. Text, Rows, Inputs and Images.

For further examples of how ImGui can be used please see:

  • The ImGui.NET sample XNA project's sample app
  • The Dear ImGui's demo source code (generally trivial to translate the C to the equivalent F#, thanks to mellinoe's excellent wrapping library)

Use case

Dear ImGui is predominantly used to construct tooling, IDEs and similar - the base library does not provide the supreme level of customisation required for a fully bespoke game.

However, a good use case (which is what I use it for) is to create a mock UI while developing, to be swapped out with a bespoke UI at a later date. Dear ImGui/ImGui.NET is good for rapid prototyping in this fashin.

The UI design philosophy that Dear ImGui implements is an excellent fit for both Monogame/XNA/Gameloop centric games, and for F# in my opinion.

License

Provided under MIT. The default font for ImGui (Proggy, also under MIT) has been overridden by personal preference with Karla regular, one of the fonts shipped with Dear ImGui itself. Karla is under the SIL Open Font License.

Version History

Version Downloads Last updated
0.0.2 56 1/31/2019