ImGuiFullscreen: Fix choice popup selected drawing over border

Backport from 05f9f33ec6
This commit is contained in:
KamFretoZ 2024-08-18 22:14:46 +07:00 committed by lightningterror
parent c72d98d4cd
commit 69574aecc6
1 changed files with 4 additions and 1 deletions

View File

@ -1091,9 +1091,12 @@ bool ImGuiFullscreen::ActiveButton(const char* title, bool is_active, bool enabl
{
if (is_active)
{
// don't draw over a prerendered border
const float border_size = ImGui::GetStyle().FrameBorderSize;
const ImVec2 border_size_v = ImVec2(border_size, border_size);
ImVec2 pos, size;
GetMenuButtonFrameBounds(height, &pos, &size);
ImGui::RenderFrame(pos, pos + size, ImGui::GetColorU32(UIPrimaryColor), false);
ImGui::RenderFrame(pos + border_size_v, pos + size - border_size_v, ImGui::GetColorU32(UIPrimaryColor), false);
}
ImRect bb;