ImGuiFullscreen: Fix choice popup selected drawing over border

This commit is contained in:
Stenzek 2024-08-13 18:00:30 +10:00
parent 7756c5a5e9
commit 05f9f33ec6
No known key found for this signature in database
1 changed files with 4 additions and 1 deletions

View File

@ -1123,9 +1123,12 @@ bool ImGuiFullscreen::ActiveButton(const char* title, bool is_active, bool enabl
{ {
if (is_active) 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; ImVec2 pos, size;
GetMenuButtonFrameBounds(height, &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; ImRect bb;