mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-03 06:13:40 +01:00
Compare commits
1 commit
33e210ea92
...
28f8521d08
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
28f8521d08 |
1 changed files with 3 additions and 34 deletions
|
|
@ -425,17 +425,8 @@ public abstract class Window
|
|||
UIGlobals.PlaySoundEffect(this.OnOpenSfxId);
|
||||
}
|
||||
|
||||
var isErrorStylePushed = false;
|
||||
if (!this.hasError)
|
||||
{
|
||||
this.PreDraw();
|
||||
this.ApplyConditionals();
|
||||
}
|
||||
else
|
||||
{
|
||||
Style.StyleModelV1.DalamudStandard.Push();
|
||||
isErrorStylePushed = true;
|
||||
}
|
||||
this.PreDraw();
|
||||
this.ApplyConditionals();
|
||||
|
||||
if (this.ForceMainWindow)
|
||||
ImGuiHelpers.ForceNextWindowMainViewport();
|
||||
|
|
@ -457,22 +448,10 @@ 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))
|
||||
{
|
||||
|
|
@ -691,17 +670,7 @@ public abstract class Window
|
|||
Task.FromResult<IDalamudTextureWrap>(tex));
|
||||
}
|
||||
|
||||
if (!this.hasError)
|
||||
{
|
||||
this.PostDraw();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isErrorStylePushed)
|
||||
{
|
||||
Style.StyleModelV1.DalamudStandard.Pop();
|
||||
}
|
||||
}
|
||||
this.PostDraw();
|
||||
|
||||
this.PostHandlePreset(persistence);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue