1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-22 02:49:56 +08:00

Avoid animating list tail

At very high scroll speeds (using pageup/pagedown) you would see a weird
animation of panels appearing. This removes the animation for that edge
case.
This commit is contained in:
Dean Herbert
2025-05-16 17:45:32 +09:00
Unverified
parent 615d4accfb
commit a32da2ea10
+5 -3
View File
@@ -747,10 +747,12 @@ namespace osu.Game.Graphics.Carousel
if (toDisplay.Contains(panel.Item!))
{
if (i == 0)
panel.DrawYPosition = panel.Item!.CarouselYPosition;
else
// Don't apply to the last because animating the tail of the list looks bad.
// It's usually off-screen anyway.
if (i > 0 && i < orderedPanels.Count - 1)
panel.DrawYPosition = orderedPanels[i - 1].DrawYPosition;
else
panel.DrawYPosition = panel.Item!.CarouselYPosition;
}
}
}