mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:17:23 +08:00
Add ScrollToSelected method
This commit is contained in:
parent
b2119efddf
commit
8458622c4d
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user