mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-14 20:54:16 +01:00
Apply TitleBgActive coloring when minimized and focused
Window-System applicable only
This commit is contained in:
parent
22810a1093
commit
339009a2fc
1 changed files with 13 additions and 0 deletions
|
|
@ -193,12 +193,25 @@ namespace Dalamud.Interface.Windowing
|
||||||
this.OnOpen();
|
this.OnOpen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var wasFocused = this.IsFocused;
|
||||||
|
if (wasFocused)
|
||||||
|
{
|
||||||
|
var style = ImGui.GetStyle();
|
||||||
|
var focusedHeaderColor = style.Colors[(int)ImGuiCol.TitleBgActive];
|
||||||
|
ImGui.PushStyleColor(ImGuiCol.TitleBgCollapsed, focusedHeaderColor);
|
||||||
|
}
|
||||||
|
|
||||||
if (ImGui.Begin(this.WindowName, ref this.internalIsOpen, this.Flags))
|
if (ImGui.Begin(this.WindowName, ref this.internalIsOpen, this.Flags))
|
||||||
{
|
{
|
||||||
// Draw the actual window contents
|
// Draw the actual window contents
|
||||||
this.Draw();
|
this.Draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (wasFocused)
|
||||||
|
{
|
||||||
|
ImGui.PopStyleColor();
|
||||||
|
}
|
||||||
|
|
||||||
this.IsFocused = ImGui.IsWindowFocused(ImGuiFocusedFlags.RootAndChildWindows);
|
this.IsFocused = ImGui.IsWindowFocused(ImGuiFocusedFlags.RootAndChildWindows);
|
||||||
|
|
||||||
var escapeDown = Service<KeyState>.Get()[VirtualKey.ESCAPE];
|
var escapeDown = Service<KeyState>.Get()[VirtualKey.ESCAPE];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue