1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 09:42:54 +08:00
This commit is contained in:
DrabWeb 2017-07-11 22:26:58 -03:00
parent 16bb96e6aa
commit aef2a3bdda
2 changed files with 13 additions and 16 deletions

View File

@ -41,17 +41,6 @@ namespace osu.Game.Overlays
private SampleChannel getSample;
protected override bool OnClick(InputState state)
{
dismiss();
return true;
}
protected override void OnFocusLost(InputState state)
{
if (state.Keyboard.Keys.Contains(Key.Escape)) dismiss();
}
public MedalOverlay(Medal medal)
{
RelativeSizeAxes = Axes.Both;
@ -182,6 +171,17 @@ namespace osu.Game.Overlays
particleContainer.Add(new MedalParticle(RNG.Next(0, 359)));
}
protected override bool OnClick(InputState state)
{
dismiss();
return true;
}
protected override void OnFocusLost(InputState state)
{
if (state.Keyboard.Keys.Contains(Key.Escape)) dismiss();
}
protected override void PopIn()
{
base.PopIn();

View File

@ -26,7 +26,6 @@ namespace osu.Game.Overlays.MedalSplash
private readonly OsuSpriteText unlocked, name;
private readonly TextFlowContainer description;
private readonly FillFlowContainer infoFlow;
private readonly IEnumerable<SpriteText> descriptionSprites;
public Action<Drawable> OnSpriteLoadComplete;
@ -108,7 +107,7 @@ namespace osu.Game.Overlays.MedalSplash
},
};
descriptionSprites = description.AddText(medal.Description, s =>
description.AddText(medal.Description, s =>
{
s.Anchor = Anchor.TopCentre;
s.Origin = Anchor.TopCentre;
@ -120,9 +119,7 @@ namespace osu.Game.Overlays.MedalSplash
private void load(OsuColour colours, TextureStore textures)
{
medalGlow.Texture = textures.Get(@"MedalSplash/medal-glow");
foreach (var s in descriptionSprites)
s.Colour = colours.BlueLight;
description.Colour = colours.BlueLight;
unlocked.Position = new Vector2(0f, medalContainer.Size.Y / 2 + 10);
infoFlow.Position = new Vector2(0f, unlocked.Position.Y + 90);