Fix some ImGui.End calls

This commit is contained in:
Haselnussbomber 2025-07-17 23:39:08 +02:00
parent 476b6b9613
commit ec9f365930
No known key found for this signature in database
GPG key ID: BB905BB49E7295D1
2 changed files with 11 additions and 8 deletions

View file

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

View file

@ -709,14 +709,17 @@ public sealed class UiBuilder : IDisposable, IUiBuilder
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.");
ImGui.Spacing();
if (ImGui.Button("OK"))
if (ImGui.Begin($"{this.namespaceName} Error", ref this.hasErrorWindow, ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoResize))
{
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();