1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 16:03:01 +08:00

Merge pull request #1524 from peppy/leaderboard-fade-out-fix

Fix leaderboard fadeout causing constant flow changes
This commit is contained in:
Dan Balasescu 2017-11-19 01:33:04 +09:00 committed by GitHub
commit 7b1083b824
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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))