FosterImGUI 1.0.1

dotnet add package FosterImGUI --version 1.0.1                
NuGet\Install-Package FosterImGUI -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FosterImGUI" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FosterImGUI --version 1.0.1                
#r "nuget: FosterImGUI, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.0.1 44 1/28/2025
1.0.0 31 1/24/2025

First version of Foster.ImGUI