From 40e63f2d9a7e015f1c7659f714d6aff1c3397918 Mon Sep 17 00:00:00 2001 From: Soreepeong <3614868+Soreepeong@users.noreply.github.com> Date: Mon, 11 Aug 2025 00:44:02 +0900 Subject: [PATCH] Enable viewport alpha --- Dalamud/Interface/Windowing/Window.cs | 21 +++++++++------------ lib/cimgui | 2 +- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/Dalamud/Interface/Windowing/Window.cs b/Dalamud/Interface/Windowing/Window.cs index d302552f5..a6b5e0801 100644 --- a/Dalamud/Interface/Windowing/Window.cs +++ b/Dalamud/Interface/Windowing/Window.cs @@ -449,11 +449,8 @@ public abstract class Window } // Not supported yet on non-main viewports - if ((this.internalIsPinned || this.internalIsClickthrough || this.internalAlpha.HasValue) && - ImGui.GetWindowViewport().ID != ImGui.GetMainViewport().ID) + if (this.internalIsClickthrough && ImGui.GetWindowViewport().ID != ImGui.GetMainViewport().ID) { - this.internalAlpha = null; - this.internalIsPinned = false; this.internalIsClickthrough = false; this.presetDirty = true; } @@ -482,11 +479,6 @@ public abstract class Window if (ImGui.BeginPopup(additionsPopupName, ImGuiWindowFlags.NoMove)) { - var isAvailable = ImGuiHelpers.CheckIsWindowOnMainViewport(); - - if (!isAvailable) - ImGui.BeginDisabled(); - if (this.internalIsClickthrough) ImGui.BeginDisabled(); @@ -506,6 +498,11 @@ public abstract class Window if (this.internalIsClickthrough) ImGui.EndDisabled(); + var isAvailable = ImGuiHelpers.CheckIsWindowOnMainViewport(); + + if (!isAvailable) + ImGui.BeginDisabled(); + if (this.AllowClickthrough) { if (ImGui.Checkbox( @@ -519,6 +516,9 @@ public abstract class Window Loc.Localize("WindowSystemContextActionClickthroughHint", "Clickthrough windows will not receive mouse input, move or resize. They are completely inert.")); } + if (!isAvailable) + ImGui.EndDisabled(); + var alpha = (this.internalAlpha ?? ImGui.GetStyle().Alpha) * 100f; if (ImGui.SliderFloat(Loc.Localize("WindowSystemContextActionAlpha", "Opacity"), ref alpha, 20f, 100f)) @@ -547,9 +547,6 @@ public abstract class Window "These features are only available if this window is inside the game window.")); } - if (!isAvailable) - ImGui.EndDisabled(); - if (ImGui.Button(Loc.Localize("WindowSystemContextActionPrintWindow", "Print window"))) printWindow = true; diff --git a/lib/cimgui b/lib/cimgui index 27c8565f6..68cce5e21 160000 --- a/lib/cimgui +++ b/lib/cimgui @@ -1 +1 @@ -Subproject commit 27c8565f631b004c3266373890e41ecc627f775b +Subproject commit 68cce5e2185948612eb80d981d4001b9737c32cf