mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 16:43:52 +09:00
Fix medal overlay display
This commit is contained in:
@ -41,11 +41,17 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
private SampleChannel getSample;
|
private SampleChannel getSample;
|
||||||
|
|
||||||
|
private readonly Container content;
|
||||||
|
|
||||||
public MedalOverlay(Medal medal)
|
public MedalOverlay(Medal medal)
|
||||||
{
|
{
|
||||||
this.medal = medal;
|
this.medal = medal;
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
|
||||||
|
Child = content = new Container
|
||||||
|
{
|
||||||
|
Alpha = 0,
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
background = new Box
|
background = new Box
|
||||||
@ -139,7 +145,10 @@ namespace osu.Game.Overlays
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
@ -168,7 +177,7 @@ namespace osu.Game.Overlays
|
|||||||
}, loaded =>
|
}, loaded =>
|
||||||
{
|
{
|
||||||
disc.Add(loaded);
|
disc.Add(loaded);
|
||||||
Show();
|
startAnimation();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -193,11 +202,10 @@ namespace osu.Game.Overlays
|
|||||||
private const double initial_duration = 400;
|
private const double initial_duration = 400;
|
||||||
private const double step_duration = 900;
|
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);
|
background.FlashColour(Color4.White.Opacity(0.25f), 400);
|
||||||
|
|
||||||
getSample.Play();
|
getSample.Play();
|
||||||
|
Reference in New Issue
Block a user