1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 08:13:31 +08:00

Add ScrollToSelected method

This commit is contained in:
EVAST9919 2017-07-29 16:03:17 +03:00
parent b2119efddf
commit 8458622c4d

View File

@ -281,6 +281,12 @@ namespace osu.Game.Screens.Select
perform();
}
public void ScrollToSelected(bool animated = true)
{
float selectedY = computeYPositions(animated);
ScrollTo(selectedY, animated);
}
private BeatmapGroup createGroup(BeatmapSetInfo beatmapSet)
{
foreach (var b in beatmapSet.Beatmaps)
@ -420,8 +426,7 @@ namespace osu.Game.Screens.Select
}
finally
{
float selectedY = computeYPositions(animated);
ScrollTo(selectedY, animated);
ScrollToSelected(animated);
}
}