Compare commits

...

5 commits

Author SHA1 Message Date
github-actions[bot]
33e210ea92 Update ClientStructs
Some checks are pending
Build Dalamud / Build on Windows (push) Waiting to run
Build Dalamud / Check API Compatibility (push) Blocked by required conditions
Build Dalamud / Deploy dalamud-distrib staging (push) Blocked by required conditions
2025-12-03 01:58:29 +00:00
goat
85949072ec
Merge pull request #2476 from MidoriKami/ForceErrorStyle
Some checks failed
Build Dalamud / Build on Windows (push) Waiting to run
Build Dalamud / Check API Compatibility (push) Blocked by required conditions
Build Dalamud / Deploy dalamud-distrib staging (push) Blocked by required conditions
Rollup changes to next version / check (api14) (push) Failing after 6s
Tag Build / Tag Build (push) Successful in 2s
Erroring Window Style Fix
2025-12-02 23:20:54 +01:00
MidoriKami
14e97a1a37 Use local variable to track pushed style state 2025-12-01 14:19:12 -08:00
MidoriKami
2e24696731 Set flags, and unlock size 2025-11-30 14:47:24 -08:00
MidoriKami
2a60bc61a7 Force style vars so erroring window renders at least partially sanely 2025-11-27 15:52:18 -08:00
2 changed files with 35 additions and 4 deletions

View file

@ -425,8 +425,17 @@ public abstract class Window
UIGlobals.PlaySoundEffect(this.OnOpenSfxId);
}
this.PreDraw();
this.ApplyConditionals();
var isErrorStylePushed = false;
if (!this.hasError)
{
this.PreDraw();
this.ApplyConditionals();
}
else
{
Style.StyleModelV1.DalamudStandard.Push();
isErrorStylePushed = true;
}
if (this.ForceMainWindow)
ImGuiHelpers.ForceNextWindowMainViewport();
@ -448,10 +457,22 @@ public abstract class Window
var flags = this.Flags;
if (this.internalIsPinned || this.internalIsClickthrough)
{
flags |= ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize;
}
if (this.internalIsClickthrough)
{
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))
{
@ -670,7 +691,17 @@ public abstract class Window
Task.FromResult<IDalamudTextureWrap>(tex));
}
this.PostDraw();
if (!this.hasError)
{
this.PostDraw();
}
else
{
if (isErrorStylePushed)
{
Style.StyleModelV1.DalamudStandard.Pop();
}
}
this.PostHandlePreset(persistence);

@ -1 +1 @@
Subproject commit e5f586630ef06fa48d5dc0d8c0fa679323093c77
Subproject commit e5dedba42a3fea8f050ea54ac583a5874bf51c6f