diff --git a/osu.Game/Overlays/MedalOverlay.cs b/osu.Game/Overlays/MedalOverlay.cs index d9c949a0da..617a5f7d0b 100644 --- a/osu.Game/Overlays/MedalOverlay.cs +++ b/osu.Game/Overlays/MedalOverlay.cs @@ -33,7 +33,7 @@ namespace osu.Game.Overlays private const float border_width = 5; private readonly Box background; - private readonly Container backgroundStrip; + private readonly Container backgroundStrip, particleContainer; private readonly BackgroundStrip leftStrip, rightStrip; private readonly CircularContainer disc; private readonly Sprite innerSpin, outterSpin; @@ -61,7 +61,6 @@ namespace osu.Game.Overlays { background = new Box { - Name = @"dim", RelativeSizeAxes = Axes.Both, Colour = Color4.Black.Opacity(60), }, @@ -74,7 +73,6 @@ namespace osu.Game.Overlays }, backgroundStrip = new Container { - Name = @"background strip", Anchor = Anchor.Centre, Origin = Anchor.Centre, RelativeSizeAxes = Axes.X, @@ -112,9 +110,12 @@ namespace osu.Game.Overlays }, }, }, + particleContainer = new Container + { + RelativeSizeAxes = Axes.Both, + }, disc = new CircularContainer { - Name = @"content", Anchor = Anchor.Centre, Origin = Anchor.Centre, Alpha = 0f, @@ -168,7 +169,11 @@ namespace osu.Game.Overlays Colour = colours.Blue.Opacity(0.5f), Radius = 50, }; + } + protected override void LoadComplete() + { + base.LoadComplete(); Show(); } @@ -176,7 +181,7 @@ namespace osu.Game.Overlays { base.Update(); - Add(new MedalParticle(RNG.Next(0, 359))); + particleContainer.Add(new MedalParticle(RNG.Next(0, 359))); } protected override void PopIn() diff --git a/osu.Game/Overlays/MedalSplash/DrawableMedal.cs b/osu.Game/Overlays/MedalSplash/DrawableMedal.cs index e230b9de9b..e385601f6d 100644 --- a/osu.Game/Overlays/MedalSplash/DrawableMedal.cs +++ b/osu.Game/Overlays/MedalSplash/DrawableMedal.cs @@ -34,7 +34,7 @@ namespace osu.Game.Overlays.MedalSplash Children = new Drawable[] { - this.medalContainer = new Container + medalContainer = new Container { Anchor = Anchor.TopCentre, Origin = Anchor.Centre, @@ -63,7 +63,7 @@ namespace osu.Game.Overlays.MedalSplash TextSize = 24, Font = @"Exo2.0-Light", Alpha = 0f, - Scale = new Vector2(1 / scale_when_unlocked), + Scale = new Vector2(1f / scale_when_unlocked), }, infoFlow = new FillFlowContainer { @@ -84,7 +84,7 @@ namespace osu.Game.Overlays.MedalSplash TextSize = 20, Font = @"Exo2.0-Bold", Alpha = 0f, - Scale = new Vector2(1 / scale_when_full), + Scale = new Vector2(1f / scale_when_full), }, description = new TextFlowContainer { @@ -93,7 +93,7 @@ namespace osu.Game.Overlays.MedalSplash RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Alpha = 0f, - Scale = new Vector2(1 / scale_when_full), + Scale = new Vector2(1f / scale_when_full), }, }, }, @@ -116,10 +116,8 @@ namespace osu.Game.Overlays.MedalSplash foreach (var s in descriptionSprites) s.Colour = colours.BlueLight; - var pos = new Vector2(0f, medalContainer.Size.Y / 2 + 10); - unlocked.Position = pos; - pos.Y += 90; - infoFlow.Position = pos; + unlocked.Position = new Vector2(0f, medalContainer.Size.Y / 2 + 10); + infoFlow.Position = new Vector2(0f, unlocked.Position.Y + 90); } public void ChangeState(DisplayState newState, double duration)