mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 22:33:43 -07:00
Dynamically changes a tracker's chosen color's opacity to full when it registers as docked to fix the framebuffer ghosting.
This commit is contained in:
parent
a247c06be8
commit
8534807228
1 changed files with 7 additions and 2 deletions
|
@ -1161,11 +1161,16 @@ void BeginFloatingWindows(std::string UniqueName, ImGuiWindowFlags flags = 0) {
|
||||||
windowFlags |= ImGuiWindowFlags_NoInputs | ImGuiWindowFlags_NoMove;
|
windowFlags |= ImGuiWindowFlags_NoInputs | ImGuiWindowFlags_NoMove;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImGui::PushStyleColor(ImGuiCol_WindowBg,
|
auto color = VecFromRGBA8(CVarGetColor(CVAR_TRACKER_ITEM("BgColor.Value"), { 0, 0, 0, 0 }));
|
||||||
VecFromRGBA8(CVarGetColor(CVAR_TRACKER_ITEM("BgColor.Value"), { 0, 0, 0, 0 })));
|
ImGuiWindow* window = ImGui::FindWindowByName(UniqueName.c_str());
|
||||||
|
if (window != NULL && window->DockTabIsVisible) {
|
||||||
|
color.w = 1.0f;
|
||||||
|
}
|
||||||
|
ImGui::PushStyleColor(ImGuiCol_WindowBg, color);
|
||||||
ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0, 0, 0, 0));
|
ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0, 0, 0, 0));
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 4.0f);
|
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 4.0f);
|
||||||
ImGui::Begin(UniqueName.c_str(), nullptr, windowFlags);
|
ImGui::Begin(UniqueName.c_str(), nullptr, windowFlags);
|
||||||
|
ImGui::GetCurrentWindow()->Name;
|
||||||
}
|
}
|
||||||
void EndFloatingWindows() {
|
void EndFloatingWindows() {
|
||||||
ImGui::PopStyleVar();
|
ImGui::PopStyleVar();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue