mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-12-19 06:22:17 +00:00
Make scroll bar in options menu more accurate.
This commit is contained in:
parent
fcd1673cfc
commit
97b20742a3
1 changed files with 2 additions and 2 deletions
|
|
@ -1339,7 +1339,7 @@ static void DrawConfigOptions()
|
||||||
// Draw scroll bar
|
// Draw scroll bar
|
||||||
if (rowCount > visibleRowCount)
|
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 heightRatio = float(visibleRowCount) / float(rowCount);
|
||||||
|
|
||||||
float offsetRatio = float(g_firstVisibleRowIndex) / float(rowCount);
|
float offsetRatio = float(g_firstVisibleRowIndex) / float(rowCount);
|
||||||
|
|
@ -1351,7 +1351,7 @@ static void DrawConfigOptions()
|
||||||
drawList->AddRectFilled
|
drawList->AddRectFilled
|
||||||
(
|
(
|
||||||
{ clipRectMax.x, minY },
|
{ clipRectMax.x, minY },
|
||||||
{ clipRectMax.x + gridSize, minY + totalHeight * heightRatio },
|
{ clipRectMax.x + gridSize - Scale(1.0f), minY + totalHeight * heightRatio},
|
||||||
IM_COL32(0, 128, 0, 255)
|
IM_COL32(0, 128, 0, 255)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue