From 2a60bc61a7713172bf60ff1b2b78076b44473ac4 Mon Sep 17 00:00:00 2001 From: MidoriKami Date: Thu, 27 Nov 2025 15:52:18 -0800 Subject: [PATCH 1/6] Force style vars so erroring window renders at least partially sanely --- Dalamud/Interface/Windowing/Window.cs | 47 ++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/Dalamud/Interface/Windowing/Window.cs b/Dalamud/Interface/Windowing/Window.cs index f12e87099..5169b9746 100644 --- a/Dalamud/Interface/Windowing/Window.cs +++ b/Dalamud/Interface/Windowing/Window.cs @@ -57,6 +57,7 @@ public abstract class Window private bool hasError = false; private Exception? lastError; + private bool isErrorStylePushed; /// /// Initializes a new instance of the class. @@ -425,8 +426,16 @@ public abstract class Window UIGlobals.PlaySoundEffect(this.OnOpenSfxId); } - this.PreDraw(); - this.ApplyConditionals(); + if (!this.hasError) + { + this.PreDraw(); + this.ApplyConditionals(); + } + else + { + Style.StyleModelV1.DalamudStandard.Push(); + this.isErrorStylePushed = true; + } if (this.ForceMainWindow) ImGuiHelpers.ForceNextWindowMainViewport(); @@ -448,10 +457,28 @@ public abstract class Window var flags = this.Flags; if (this.internalIsPinned || this.internalIsClickthrough) - flags |= ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize; + { + if (!this.hasError) + { + flags |= ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize; + } + else + { + flags &= ~(ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize); + } + } if (this.internalIsClickthrough) - flags |= ImGuiWindowFlags.NoInputs | ImGuiWindowFlags.NoNav | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoScrollWithMouse | ImGuiWindowFlags.NoMouseInputs; + { + if (!this.hasError) + { + flags |= ImGuiWindowFlags.NoInputs | ImGuiWindowFlags.NoNav | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoScrollWithMouse | ImGuiWindowFlags.NoMouseInputs; + } + else + { + flags &= ~(ImGuiWindowFlags.NoInputs | ImGuiWindowFlags.NoNav | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoScrollWithMouse | ImGuiWindowFlags.NoMouseInputs); + } + } if (this.CanShowCloseButton ? ImGui.Begin(this.WindowName, ref this.internalIsOpen, flags) : ImGui.Begin(this.WindowName, flags)) { @@ -670,7 +697,17 @@ public abstract class Window Task.FromResult(tex)); } - this.PostDraw(); + if (!this.hasError) + { + this.PostDraw(); + } + else + { + if (this.isErrorStylePushed) + { + Style.StyleModelV1.DalamudStandard.Pop(); + } + } this.PostHandlePreset(persistence); From fadf941fa47f5d8775f157a64a5414bfcb00faab Mon Sep 17 00:00:00 2001 From: goaaats Date: Sun, 30 Nov 2025 02:01:01 +0100 Subject: [PATCH 2/6] Re-add config properties for XLCore/XoM backwards compatibility --- Dalamud/Configuration/Internal/DalamudConfiguration.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Dalamud/Configuration/Internal/DalamudConfiguration.cs b/Dalamud/Configuration/Internal/DalamudConfiguration.cs index 9404b5b10..d546dc517 100644 --- a/Dalamud/Configuration/Internal/DalamudConfiguration.cs +++ b/Dalamud/Configuration/Internal/DalamudConfiguration.cs @@ -487,6 +487,14 @@ internal sealed class DalamudConfiguration : IInternalDisposableService /// public Vector2 NotificationAnchorPosition { get; set; } = new(1f, 1f); +#pragma warning disable SA1600 +#pragma warning disable SA1516 + // XLCore/XoM compatibility until they move it out + public string? DalamudBetaKey { get; set; } = null; + public string? DalamudBetaKind { get; set; } +#pragma warning restore SA1516 +#pragma warning restore SA1600 + /// /// Load a configuration from the provided path. /// From ac2d522415b9a5ccec7a8c5cead997413412a699 Mon Sep 17 00:00:00 2001 From: goaaats Date: Sun, 30 Nov 2025 02:47:07 +0100 Subject: [PATCH 3/6] build: 13.0.0.12 --- Dalamud/Dalamud.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dalamud/Dalamud.csproj b/Dalamud/Dalamud.csproj index ce140b8c9..d1f730d5e 100644 --- a/Dalamud/Dalamud.csproj +++ b/Dalamud/Dalamud.csproj @@ -6,7 +6,7 @@ XIV Launcher addon framework - 13.0.0.11 + 13.0.0.12 $(DalamudVersion) $(DalamudVersion) $(DalamudVersion) From 2e246967317427d2d5749d69b24a3e8ebc77d328 Mon Sep 17 00:00:00 2001 From: MidoriKami Date: Sun, 30 Nov 2025 14:47:24 -0800 Subject: [PATCH 4/6] Set flags, and unlock size --- Dalamud/Interface/Windowing/Window.cs | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/Dalamud/Interface/Windowing/Window.cs b/Dalamud/Interface/Windowing/Window.cs index 5169b9746..700481ce5 100644 --- a/Dalamud/Interface/Windowing/Window.cs +++ b/Dalamud/Interface/Windowing/Window.cs @@ -458,26 +458,20 @@ public abstract class Window if (this.internalIsPinned || this.internalIsClickthrough) { - if (!this.hasError) - { - flags |= ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize; - } - else - { - flags &= ~(ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize); - } + flags |= ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize; } if (this.internalIsClickthrough) { - if (!this.hasError) - { - flags |= ImGuiWindowFlags.NoInputs | ImGuiWindowFlags.NoNav | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoScrollWithMouse | ImGuiWindowFlags.NoMouseInputs; - } - else - { - flags &= ~(ImGuiWindowFlags.NoInputs | ImGuiWindowFlags.NoNav | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoScrollWithMouse | ImGuiWindowFlags.NoMouseInputs); - } + flags |= ImGuiWindowFlags.NoInputs | ImGuiWindowFlags.NoNav | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoScrollWithMouse | ImGuiWindowFlags.NoMouseInputs; + } + + // If we have an error, reset all flags to default, and unlock window size. + if (this.hasError) + { + flags = ImGuiWindowFlags.None; + ImGui.SetNextWindowCollapsed(false, ImGuiCond.Once); + ImGui.SetNextWindowSizeConstraints(Vector2.Zero, Vector2.PositiveInfinity); } if (this.CanShowCloseButton ? ImGui.Begin(this.WindowName, ref this.internalIsOpen, flags) : ImGui.Begin(this.WindowName, flags)) From fb229a0a128dd36b3e531be7bd00d260649ce379 Mon Sep 17 00:00:00 2001 From: Haselnussbomber Date: Mon, 1 Dec 2025 12:07:34 +0100 Subject: [PATCH 5/6] Fix PlayerState.Level being synced --- Dalamud/Game/Player/PlayerState.cs | 2 +- Dalamud/Plugin/Services/IPlayerState.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dalamud/Game/Player/PlayerState.cs b/Dalamud/Game/Player/PlayerState.cs index 917c946db..bd19b5bfb 100644 --- a/Dalamud/Game/Player/PlayerState.cs +++ b/Dalamud/Game/Player/PlayerState.cs @@ -77,7 +77,7 @@ internal unsafe class PlayerState : IServiceType, IPlayerState public RowRef ClassJob => this.IsLoaded ? LuminaUtils.CreateRef(CSPlayerState.Instance()->CurrentClassJobId) : default; /// - public short Level => this.IsLoaded ? CSPlayerState.Instance()->CurrentLevel : default; + public short Level => this.IsLoaded && this.ClassJob.IsValid ? this.GetClassJobLevel(this.ClassJob.Value) : this.EffectiveLevel; /// public bool IsLevelSynced => this.IsLoaded && CSPlayerState.Instance()->IsLevelSynced; diff --git a/Dalamud/Plugin/Services/IPlayerState.cs b/Dalamud/Plugin/Services/IPlayerState.cs index 1416dfb77..21d88010b 100644 --- a/Dalamud/Plugin/Services/IPlayerState.cs +++ b/Dalamud/Plugin/Services/IPlayerState.cs @@ -79,7 +79,7 @@ public interface IPlayerState : IDalamudService bool IsLevelSynced { get; } /// - /// Gets the effective level of the local character. + /// Gets the effective level of the local character, taking level sync into account. /// short EffectiveLevel { get; } From 14e97a1a374b7968f28dc856203e9ba990c31ccd Mon Sep 17 00:00:00 2001 From: MidoriKami Date: Mon, 1 Dec 2025 14:19:12 -0800 Subject: [PATCH 6/6] Use local variable to track pushed style state --- Dalamud/Interface/Windowing/Window.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dalamud/Interface/Windowing/Window.cs b/Dalamud/Interface/Windowing/Window.cs index 700481ce5..e90e38119 100644 --- a/Dalamud/Interface/Windowing/Window.cs +++ b/Dalamud/Interface/Windowing/Window.cs @@ -57,7 +57,6 @@ public abstract class Window private bool hasError = false; private Exception? lastError; - private bool isErrorStylePushed; /// /// Initializes a new instance of the class. @@ -426,6 +425,7 @@ public abstract class Window UIGlobals.PlaySoundEffect(this.OnOpenSfxId); } + var isErrorStylePushed = false; if (!this.hasError) { this.PreDraw(); @@ -434,7 +434,7 @@ public abstract class Window else { Style.StyleModelV1.DalamudStandard.Push(); - this.isErrorStylePushed = true; + isErrorStylePushed = true; } if (this.ForceMainWindow) @@ -697,7 +697,7 @@ public abstract class Window } else { - if (this.isErrorStylePushed) + if (isErrorStylePushed) { Style.StyleModelV1.DalamudStandard.Pop(); }