This commit is contained in:
DrabWeb 2017-06-24 01:48:55 -03:00
parent 0133f9c086
commit b2c516238e
2 changed files with 16 additions and 13 deletions

View File

@ -33,7 +33,7 @@ public class MedalOverlay : FocusedOverlayContainer
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 @@ public MedalOverlay(Medal medal)
{
background = new Box
{
Name = @"dim",
RelativeSizeAxes = Axes.Both,
Colour = Color4.Black.Opacity(60),
},
@ -74,7 +73,6 @@ public MedalOverlay(Medal medal)
},
backgroundStrip = new Container
{
Name = @"background strip",
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.X,
@ -112,9 +110,12 @@ public MedalOverlay(Medal medal)
},
},
},
particleContainer = new Container
{
RelativeSizeAxes = Axes.Both,
},
disc = new CircularContainer
{
Name = @"content",
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Alpha = 0f,
@ -168,7 +169,11 @@ private void load(OsuColour colours, TextureStore textures, AudioManager audio)
Colour = colours.Blue.Opacity(0.5f),
Radius = 50,
};
}
protected override void LoadComplete()
{
base.LoadComplete();
Show();
}
@ -176,7 +181,7 @@ protected override void Update()
{
base.Update();
Add(new MedalParticle(RNG.Next(0, 359)));
particleContainer.Add(new MedalParticle(RNG.Next(0, 359)));
}
protected override void PopIn()

View File

@ -34,7 +34,7 @@ public DrawableMedal(Medal medal)
Children = new Drawable[]
{
this.medalContainer = new Container
medalContainer = new Container
{
Anchor = Anchor.TopCentre,
Origin = Anchor.Centre,
@ -63,7 +63,7 @@ public DrawableMedal(Medal medal)
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 @@ public DrawableMedal(Medal medal)
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 @@ public DrawableMedal(Medal medal)
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 @@ private void load(OsuColour colours, TextureStore textures)
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)