FosterImGUI 1.0.1
dotnet add package FosterImGUI --version 1.0.1
NuGet\Install-Package FosterImGUI -Version 1.0.1
<PackageReference Include="FosterImGUI" Version="1.0.1" />
paket add FosterImGUI --version 1.0.1
#r "nuget: FosterImGUI, 1.0.1"
// Install FosterImGUI as a Cake Addin #addin nuget:?package=FosterImGUI&version=1.0.1 // Install FosterImGUI as a Cake Tool #tool nuget:?package=FosterImGUI&version=1.0.1
Foster.ImGUI
The famous ImGUI library ready to use in your Foster project!
Installation
The easiest solution to add Foster.ImGUI into your project is using NuGeT:
dotnet add package FosterImGUI --version 1.0.1
Or you can install it by cloning the repository, adding the .csproj to your solution and adding it as a project reference.
Usage
Firstly, you may instantiate a Renderer
.
public class MyGame : App
{
Renderer _imGuiRenderer;
public MyGame()
{
_imGuiRenderer = new(this);
}
}
You can now build your ImGUI app inside the Update
:
protected override void Update()
{
_imGuiRenderer.BeginLayout();
// Put your ImGUI app here
_imGuiRenderer.EndLayout();
}
Now, you only have to render everything!
protected override void Render()
{
Window.Clear(Color.Black);
_imGuiRenderer.Render();
}
Don't forget to dispose the ImGui renderer at the Shutdown
of your app!
protected override void Shutdown()
{
_imGuiRenderer.Dispose();
}
Enjoy!
Credits
The code was taken from the sample ImGUI project of Noel The original library: https://github.com/ocornut/imgui .Net wrapper of ImGUI: https://github.com/ImGuiNET/ImGui.NET
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net9.0
- FosterFramework (>= 0.2.0)
- ImGui.NET (>= 1.91.6.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
First version of Foster.ImGUI