1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Fix leaderboard fadeout causing constant flow changes

Also cleans up logic significantly.
This commit is contained in:
Dean Herbert 2017-11-19 00:53:59 +09:00
parent 7046d0a675
commit 9325730f5d

View File

@ -40,20 +40,12 @@ namespace osu.Game.Screens.Select.Leaderboards
scores = value;
getScoresRequest?.Cancel();
int i = 150;
scrollFlow?.FadeOut(200);
scrollFlow?.Expire();
scrollFlow = null;
if (scores == null)
{
if (scrollFlow != null)
{
foreach (var c in scrollFlow.Children)
c.FadeOut(i += 10);
foreach (var c in scrollFlow.Children)
c.LifetimeEnd = Time.Current + i;
}
return;
}
// schedule because we may not be loaded yet (LoadComponentAsync complains).
Schedule(() =>
@ -67,10 +59,9 @@ namespace osu.Game.Screens.Select.Leaderboards
ChildrenEnumerable = scores.Select((s, index) => new LeaderboardScore(s, index + 1) { Action = () => ScoreSelected?.Invoke(s) })
}, f =>
{
scrollFlow?.Expire();
scrollContainer.Add(scrollFlow = f);
i = 0;
int i = 0;
foreach (var s in f.Children)
{
using (s.BeginDelayedSequence(i++ * 50, true))