Improve tracker dock bgs (#5383)

* Modify the flow for applying opacity to docked tracker windows only when they are docked to the "Main - Deck" dockspace.

* Add opacity clamping for check tracker.
This commit is contained in:
Malkierian
2025-04-11 19:54:52 -07:00
committed by GitHub
parent f0f2157a4c
commit fc0cbbe9e7
2 changed files with 10 additions and 3 deletions

View File

@@ -1162,8 +1162,10 @@ void BeginFloatingWindows(std::string UniqueName, ImGuiWindowFlags flags = 0) {
}
}
auto color = VecFromRGBA8(CVarGetColor(CVAR_TRACKER_ITEM("BgColor.Value"), { 0, 0, 0, 0 }));
auto maybeParent = ImGui::GetCurrentWindow();
ImGuiWindow* window = ImGui::FindWindowByName(UniqueName.c_str());
if (window != NULL && window->DockTabIsVisible) {
if (window != NULL && window->DockTabIsVisible && window->ParentWindow != NULL &&
std::string(window->ParentWindow->Name).compare(0, strlen("Main - Deck"), "Main - Deck") == 0) {
color.w = 1.0f;
}
ImGui::PushStyleColor(ImGuiCol_WindowBg, color);