From 8c5785fdf63e30bb58d9ff587a3718892278c8be Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 11 Nov 2024 22:57:26 +0900 Subject: [PATCH] Make math more logical --- osu.Game/Screens/Select/BeatmapCarousel.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Game/Screens/Select/BeatmapCarousel.cs b/osu.Game/Screens/Select/BeatmapCarousel.cs index ba20031509..5716b2c918 100644 --- a/osu.Game/Screens/Select/BeatmapCarousel.cs +++ b/osu.Game/Screens/Select/BeatmapCarousel.cs @@ -1280,14 +1280,14 @@ namespace osu.Game.Screens.Select } private const float top_padding = 10; - private const float bottom_padding = 80; + private const float bottom_padding = 70; protected override float ToScrollbarPosition(float scrollPosition) { if (Precision.AlmostEquals(0, ScrollableExtent)) return 0; - return top_padding + (ScrollbarMovementExtent - bottom_padding) * (scrollPosition / ScrollableExtent); + return top_padding + (ScrollbarMovementExtent - (top_padding + bottom_padding)) * (scrollPosition / ScrollableExtent); } protected override float FromScrollbarPosition(float scrollbarPosition) @@ -1295,7 +1295,7 @@ namespace osu.Game.Screens.Select if (Precision.AlmostEquals(0, ScrollbarMovementExtent)) return 0; - return ScrollableExtent * ((scrollbarPosition - top_padding) / (ScrollbarMovementExtent - bottom_padding)); + return ScrollableExtent * ((scrollbarPosition - top_padding) / (ScrollbarMovementExtent - (top_padding + bottom_padding))); } }