mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 05:42:56 +08:00
Merge pull request #6905 from peppy/carousel-less-scroll-motion
Reduce carousel scroll motion on initial display
This commit is contained in:
commit
821a26682e
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user