mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
Set flags, and unlock size
This commit is contained in:
parent
2a60bc61a7
commit
2e24696731
1 changed files with 10 additions and 16 deletions
|
|
@ -458,26 +458,20 @@ public abstract class Window
|
||||||
|
|
||||||
if (this.internalIsPinned || this.internalIsClickthrough)
|
if (this.internalIsPinned || this.internalIsClickthrough)
|
||||||
{
|
{
|
||||||
if (!this.hasError)
|
flags |= ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize;
|
||||||
{
|
|
||||||
flags |= ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
flags &= ~(ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.internalIsClickthrough)
|
if (this.internalIsClickthrough)
|
||||||
{
|
{
|
||||||
if (!this.hasError)
|
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.
|
||||||
else
|
if (this.hasError)
|
||||||
{
|
{
|
||||||
flags &= ~(ImGuiWindowFlags.NoInputs | ImGuiWindowFlags.NoNav | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoScrollWithMouse | ImGuiWindowFlags.NoMouseInputs);
|
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))
|
if (this.CanShowCloseButton ? ImGui.Begin(this.WindowName, ref this.internalIsOpen, flags) : ImGui.Begin(this.WindowName, flags))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue