Merge pull request #6905 from peppy/carousel-less-scroll-motion

Reduce carousel scroll motion on initial display
This commit is contained in:
Dan Balasescu
2019-11-22 12:39:31 +09:00
committed by GitHub

View File

@ -640,10 +640,19 @@ namespace osu.Game.Screens.Select
itemsCache.Validate();
}
private bool firstScroll = true;
private void updateScrollPosition()
{
if (scrollTarget != null)
{
if (firstScroll)
{
// reduce movement when first displaying the carousel.
scroll.ScrollTo(scrollTarget.Value - 200, false);
firstScroll = false;
}
scroll.ScrollTo(scrollTarget.Value);
scrollPositionCache.Validate();
}