1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 18:42:56 +08:00

Reduce carousel scroll motion on initial display

This commit is contained in:
Dean Herbert 2019-11-22 10:51:49 +09:00
parent 337112834b
commit d8260f4a65

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();
}