EZImGui 1.0.1

dotnet add package EZImGui --version 1.0.1
NuGet\Install-Package EZImGui -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="EZImGui" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EZImGui --version 1.0.1
#r "nuget: EZImGui, 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 EZImGui as a Cake Addin
#addin nuget:?package=EZImGui&version=1.0.1

// Install EZImGui as a Cake Tool
#tool nuget:?package=EZImGui&version=1.0.1

EZImGui

Easy to use ImGui framework for .Net

How To Use

Creating Panels/Menus

using ImGuiNet;

public class MyPanel : IPanel
{
    public void Render()
    {
        ImGui.ShowDemoWindow();
    }
}

public class MyMenu : IMenu
{
    public void RenderMenu()
    {
        if(ImGui.BeginMenu("File"))
        {
            if(ImGui.MenuItem("Some Item"))
                Logger.Debug("Some Item Clicked!");
            ImGui.EndMenu();
        }
    }
}

Setup your app

using EZImGui;
using ImGuiNet;

static class Program
{
    static void Main(string[] args)
    {
        // Create App
        App.CreateApp("My App Name", 800, 480);
        // Add Menus
        App.AddMenu(new MyMenu());
        // Add Panels
        App.AddPanel(new MyPanel());
        // Start the app
        App.Start();
    }
}

Settings (In Development)

The framework includes a YAML based settings framework. If settings are enabled, they will be automatically loaded/saved on app start/end.

To implement your own settings, simply create a new class defining your settings, create a new AppSettings<T> with your class

class MySettings
{
    public string SomeVar { get; set; }
    ...
}

Then in your main program:

AppSettings<MySettings> settings = new AppSettings<MySettings>();

Add any type converters (optional)

settings.AddTypeConverter(new MyTypeConverter());

Register your settings handler settings. (optional)

settings.HandleSettings = SettingsHandler;

Finally, add the settings class to your app:

App.AddSettings(settings);

You generally shouldn't need to add a SettingsHandler, but it may be useful for some special cases. Otherwise, you should be able to access your settings by calling the App.Settings.GetSettings() function, or by casting the App.Settings interface back to your type.

Contributing

All contributions are welcome!

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
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 211 11/29/2023
1.0.0.1 88 11/29/2023
1.0.0 116 11/29/2023

Initial release, may be a bit buggy