Merge pull request #2316 from Haselnussbomber/fixes

[imgui-bindings] Small fixes
This commit is contained in:
goat 2025-07-19 02:05:41 +02:00 committed by GitHub
commit 6078c42963
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 8 deletions

View file

@ -241,6 +241,7 @@ internal sealed unsafe class Dx11Win32Backend : IWin32Backend
this.imguiRenderer?.Dispose(); this.imguiRenderer?.Dispose();
this.imguiInput?.Dispose(); this.imguiInput?.Dispose();
ImPlot.DestroyContext();
ImGui.DestroyContext(); ImGui.DestroyContext();
this.swapChain.Dispose(); this.swapChain.Dispose();

View file

@ -640,10 +640,10 @@ internal class DalamudInterface : IInternalDisposableService
ImGui.SetNextItemWidth(40); ImGui.SetNextItemWidth(40);
if (ImGui.Button("###devMenuOpener", new Vector2(20, 20))) if (ImGui.Button("###devMenuOpener", new Vector2(20, 20)))
this.isImGuiDrawDevMenu = true; this.isImGuiDrawDevMenu = true;
ImGui.End();
} }
ImGui.End();
if (EnvironmentConfiguration.DalamudForceMinHook) if (EnvironmentConfiguration.DalamudForceMinHook)
{ {
ImGui.SetNextWindowPos(windowPos, ImGuiCond.Always); ImGui.SetNextWindowPos(windowPos, ImGuiCond.Always);

View file

@ -709,14 +709,17 @@ public sealed class UiBuilder : IDisposable, IUiBuilder
this.stopwatch.Restart(); this.stopwatch.Restart();
} }
if (this.hasErrorWindow && ImGui.Begin($"{this.namespaceName} Error", ref this.hasErrorWindow, ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoResize)) if (this.hasErrorWindow)
{ {
ImGui.Text($"The plugin {this.namespaceName} ran into an error.\nContact the plugin developer for support.\n\nPlease try restarting your game."); if (ImGui.Begin($"{this.namespaceName} Error", ref this.hasErrorWindow, ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoResize))
ImGui.Spacing();
if (ImGui.Button("OK"))
{ {
this.hasErrorWindow = false; ImGui.Text($"The plugin {this.namespaceName} ran into an error.\nContact the plugin developer for support.\n\nPlease try restarting your game.");
ImGui.Spacing();
if (ImGui.Button("OK"))
{
this.hasErrorWindow = false;
}
} }
ImGui.End(); ImGui.End();