From 97b20742a35a04b11572ff14abd59d600b7e1100 Mon Sep 17 00:00:00 2001 From: Skyth <19259897+blueskythlikesclouds@users.noreply.github.com> Date: Sun, 9 Feb 2025 00:29:40 +0300 Subject: [PATCH] Make scroll bar in options menu more accurate. --- UnleashedRecomp/ui/options_menu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UnleashedRecomp/ui/options_menu.cpp b/UnleashedRecomp/ui/options_menu.cpp index 2008383..dcaa71c 100644 --- a/UnleashedRecomp/ui/options_menu.cpp +++ b/UnleashedRecomp/ui/options_menu.cpp @@ -1339,7 +1339,7 @@ static void DrawConfigOptions() // Draw scroll bar if (rowCount > visibleRowCount) { - float totalHeight = (clipRectMax.y - clipRectMin.y); + float totalHeight = (clipRectMax.y - clipRectMin.y) - Scale(2.0f); float heightRatio = float(visibleRowCount) / float(rowCount); float offsetRatio = float(g_firstVisibleRowIndex) / float(rowCount); @@ -1351,7 +1351,7 @@ static void DrawConfigOptions() drawList->AddRectFilled ( { clipRectMax.x, minY }, - { clipRectMax.x + gridSize, minY + totalHeight * heightRatio }, + { clipRectMax.x + gridSize - Scale(1.0f), minY + totalHeight * heightRatio}, IM_COL32(0, 128, 0, 255) ); }