Fix medal overlay display

This commit is contained in:
Dean Herbert
2020-01-07 13:39:30 +09:00
parent 9fb29cc7a7
commit fd925526e2

View File

@ -41,11 +41,17 @@ namespace osu.Game.Overlays
private SampleChannel getSample;
private readonly Container content;
public MedalOverlay(Medal medal)
{
this.medal = medal;
RelativeSizeAxes = Axes.Both;
Child = content = new Container
{
Alpha = 0,
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{
background = new Box
@ -139,7 +145,10 @@ namespace osu.Game.Overlays
},
},
},
}
};
Show();
}
[BackgroundDependencyLoader]
@ -168,7 +177,7 @@ namespace osu.Game.Overlays
}, loaded =>
{
disc.Add(loaded);
Show();
startAnimation();
});
}
@ -193,11 +202,10 @@ namespace osu.Game.Overlays
private const double initial_duration = 400;
private const double step_duration = 900;
protected override void PopIn()
private void startAnimation()
{
base.PopIn();
content.Show();
this.FadeIn(200);
background.FlashColour(Color4.White.Opacity(0.25f), 400);
getSample.Play();