EZImGui 1.0.1
dotnet add package EZImGui --version 1.0.1
NuGet\Install-Package EZImGui -Version 1.0.1
<PackageReference Include="EZImGui" Version="1.0.1" />
paket add EZImGui --version 1.0.1
#r "nuget: EZImGui, 1.0.1"
// 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 | Versions 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. |
-
net8.0
- ImGui.NET (>= 1.90.0.1)
- OpenTK (>= 4.8.1)
- Serilog (>= 3.1.1)
- Serilog.Sinks.File (>= 5.0.0)
- StbImageSharp (>= 2.27.13)
- YamlDotNet (>= 13.7.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial release, may be a bit buggy