Adjust transition to now show janky resize

This commit is contained in:
Dean Herbert 2019-07-22 23:28:17 +09:00
parent 95241165cc
commit 5a6c8bfec9
1 changed files with 4 additions and 12 deletions

View File

@ -1,4 +1,4 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Bindables;
@ -17,7 +17,7 @@ namespace osu.Game.Screens.Select.Details
public class UserTopScoreContainer : VisibilityContainer
{
private const int height = 90;
private const int duration = 300;
private const int duration = 800;
private readonly Container contentContainer;
private readonly Container scoreContainer;
@ -92,16 +92,8 @@ private void onScoreChanged(ValueChangedEvent<APILegacyUserTopScoreInfo> score)
}, (loadScoreCancellation = new CancellationTokenSource()).Token);
}
protected override void PopIn()
{
this.ResizeHeightTo(height, duration, Easing.OutQuint);
contentContainer.FadeIn(duration, Easing.OutQuint);
}
protected override void PopIn() => this.ResizeHeightTo(height, duration / 4f, Easing.OutQuint).OnComplete(_ => contentContainer.FadeIn(duration, Easing.OutQuint));
protected override void PopOut()
{
this.ResizeHeightTo(0, duration, Easing.OutQuint);
contentContainer.FadeOut(duration, Easing.OutQuint);
}
protected override void PopOut() => contentContainer.FadeOut(duration, Easing.OutQuint).OnComplete(_ => this.ResizeHeightTo(0));
}
}