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:
parent
337112834b
commit
d8260f4a65
@ -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