This is a project for game creation, OpenGL window context creation in SFML and input control, implemented in C#
All ImGui draw calls are called from the classic Nuget ImGui.Net package.
This solution is not 100% stable and does not give any guarantees since this is a port.
This solution was written solely for educational purposes
See the Source in Program.cs
while (renderWindow.IsOpen) {
// ...
ImGui.ShowDemoWindow(); // imgui.net native
imgui.Render(); // imgui object
// ...
}
Easy imgui menu bar
ImGui.Begin("menu", ImGuiWindowFlags.MenuBar);
if(ImGui.BeginMenuBar())
{
if(ImGui.BeginMenu("File"))
{
if(ImGui.MenuItem("Open", "Ctrl+O")) { /* Do stuff */ }
if (ImGui.MenuItem("Save", "Ctrl+S")) { /* Do stuff */ }
if (ImGui.MenuItem("Close", "Ctrl+W")) { /* Do stuff */ }
ImGui.EndMenu();
}
ImGui.EndMenuBar();
}
ImGui.End();