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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user