mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Compare commits
5 commits
1b97836ce5
...
4a1a36d179
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a1a36d179 | ||
|
|
85949072ec | ||
|
|
14e97a1a37 | ||
|
|
2e24696731 | ||
|
|
2a60bc61a7 |
2 changed files with 35 additions and 4 deletions
|
|
@ -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 5d01489c34f33a3d645f49085d7fc0065a1ac801
|
||||
Subproject commit 19a97b5ac364b51405097fe3a09af27a368f861a
|
||||
Loading…
Add table
Add a link
Reference in a new issue