1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-31 00:02:56 +08:00

Move shadow fade logic

This commit is contained in:
Dean Herbert 2019-05-14 15:19:23 +09:00
parent a765f2502d
commit e893925417
3 changed files with 20 additions and 21 deletions

View File

@ -84,16 +84,10 @@ namespace osu.Game.Overlays
this.rulesets = rulesets;
}
protected override void PopIn()
protected override void PopOutComplete()
{
base.PopIn();
FadeEdgeEffectTo(0.25f, WaveContainer.APPEAR_DURATION, Easing.In);
}
protected override void PopOut()
{
base.PopOut();
FadeEdgeEffectTo(0, WaveContainer.DISAPPEAR_DURATION, Easing.Out).OnComplete(_ => beatmapSet.Value = null);
base.PopOutComplete();
beatmapSet.Value = null;
}
protected override bool OnClick(ClickEvent e)

View File

@ -6,6 +6,7 @@ using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Effects;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Online.API;
using osuTK.Graphics;
@ -39,6 +40,22 @@ namespace osu.Game.Overlays
};
}
protected override void PopIn()
{
base.PopIn();
FadeEdgeEffectTo(0.4f, WaveContainer.APPEAR_DURATION, Easing.Out);
}
protected override void PopOut()
{
base.PopOut();
FadeEdgeEffectTo(0, WaveContainer.DISAPPEAR_DURATION, Easing.In).OnComplete(_ => PopOutComplete());
}
protected virtual void PopOutComplete()
{
}
protected override void LoadComplete()
{
base.LoadComplete();

View File

@ -28,18 +28,6 @@ namespace osu.Game.Overlays
public const float CONTENT_X_MARGIN = 70;
protected override void PopIn()
{
base.PopIn();
FadeEdgeEffectTo(0.5f, WaveContainer.APPEAR_DURATION, Easing.In);
}
protected override void PopOut()
{
base.PopOut();
FadeEdgeEffectTo(0, WaveContainer.DISAPPEAR_DURATION, Easing.Out);
}
public void ShowUser(long userId) => ShowUser(new User { Id = userId });
public void ShowUser(User user, bool fetchOnline = true)