fsharp-gamecore-imgui
0.0.2
dotnet add package fsharp-gamecore-imgui --version 0.0.2
NuGet\Install-Package fsharp-gamecore-imgui -Version 0.0.2
<PackageReference Include="fsharp-gamecore-imgui" Version="0.0.2" />
paket add fsharp-gamecore-imgui --version 0.0.2
#r "nuget: fsharp-gamecore-imgui, 0.0.2"
// Install fsharp-gamecore-imgui as a Cake Addin #addin nuget:?package=fsharp-gamecore-imgui&version=0.0.2 // Install fsharp-gamecore-imgui as a Cake Tool #tool nuget:?package=fsharp-gamecore-imgui&version=0.0.2
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.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- FSharp.Core (>= 4.5.2)
- fsharp-gamecore (>= 0.0.8)
- ImGui.NET (>= 1.67.0)
- MonoGame.Framework.DesktopGL.Core (>= 3.7.0.7)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.0.2 | 721 | 1/31/2019 |