From 7f108285fe8f5e813be1ac8c95d48d84f2c777cf Mon Sep 17 00:00:00 2001 From: DeaTh-G <55578911+DeaTh-G@users.noreply.github.com> Date: Sat, 8 Feb 2025 22:33:49 +0100 Subject: [PATCH] Fix clipping detail from the next not visible element on the options list (#321) * decrease maximum clip rect size for options list * respect window scaling * move clip rect fix location --- UnleashedRecomp/ui/options_menu.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/UnleashedRecomp/ui/options_menu.cpp b/UnleashedRecomp/ui/options_menu.cpp index dcaa71c..0b88bf8 100644 --- a/UnleashedRecomp/ui/options_menu.cpp +++ b/UnleashedRecomp/ui/options_menu.cpp @@ -1157,6 +1157,8 @@ static void DrawConfigOptions() auto clipRectMin = drawList->GetClipRectMin(); auto clipRectMax = drawList->GetClipRectMax(); + drawList->PushClipRect({ clipRectMin.x, clipRectMin.y }, { clipRectMax.x, clipRectMax.y - Scale(5.0f) }); + g_selectedItem = nullptr; float gridSize = Scale(GRID_SIZE); @@ -1333,6 +1335,8 @@ static void DrawConfigOptions() if (disableMoveAnimation) g_prevSelectedRowIndex = g_selectedRowIndex; + drawList->PopClipRect(); + // Pop clip rect from DrawCategories drawList->PopClipRect();