mirror of https://github.com/ppy/osu
Adjust transition to now show janky resize
This commit is contained in:
parent
95241165cc
commit
5a6c8bfec9
|
@ -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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
|
@ -17,7 +17,7 @@ namespace osu.Game.Screens.Select.Details
|
||||||
public class UserTopScoreContainer : VisibilityContainer
|
public class UserTopScoreContainer : VisibilityContainer
|
||||||
{
|
{
|
||||||
private const int height = 90;
|
private const int height = 90;
|
||||||
private const int duration = 300;
|
private const int duration = 800;
|
||||||
|
|
||||||
private readonly Container contentContainer;
|
private readonly Container contentContainer;
|
||||||
private readonly Container scoreContainer;
|
private readonly Container scoreContainer;
|
||||||
|
@ -92,16 +92,8 @@ private void onScoreChanged(ValueChangedEvent<APILegacyUserTopScoreInfo> score)
|
||||||
}, (loadScoreCancellation = new CancellationTokenSource()).Token);
|
}, (loadScoreCancellation = new CancellationTokenSource()).Token);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PopIn()
|
protected override void PopIn() => this.ResizeHeightTo(height, duration / 4f, Easing.OutQuint).OnComplete(_ => contentContainer.FadeIn(duration, Easing.OutQuint));
|
||||||
{
|
|
||||||
this.ResizeHeightTo(height, duration, Easing.OutQuint);
|
|
||||||
contentContainer.FadeIn(duration, Easing.OutQuint);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void PopOut()
|
protected override void PopOut() => contentContainer.FadeOut(duration, Easing.OutQuint).OnComplete(_ => this.ResizeHeightTo(0));
|
||||||
{
|
|
||||||
this.ResizeHeightTo(0, duration, Easing.OutQuint);
|
|
||||||
contentContainer.FadeOut(duration, Easing.OutQuint);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue