mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 09:42:54 +08:00
Cleanup.
This commit is contained in:
parent
16bb96e6aa
commit
aef2a3bdda
@ -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();
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user