mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 09:02:55 +08:00
Cleanup.
This commit is contained in:
parent
16bb96e6aa
commit
aef2a3bdda
@ -41,17 +41,6 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
private SampleChannel getSample;
|
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)
|
public MedalOverlay(Medal medal)
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
@ -182,6 +171,17 @@ namespace osu.Game.Overlays
|
|||||||
particleContainer.Add(new MedalParticle(RNG.Next(0, 359)));
|
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()
|
protected override void PopIn()
|
||||||
{
|
{
|
||||||
base.PopIn();
|
base.PopIn();
|
||||||
|
@ -26,7 +26,6 @@ namespace osu.Game.Overlays.MedalSplash
|
|||||||
private readonly OsuSpriteText unlocked, name;
|
private readonly OsuSpriteText unlocked, name;
|
||||||
private readonly TextFlowContainer description;
|
private readonly TextFlowContainer description;
|
||||||
private readonly FillFlowContainer infoFlow;
|
private readonly FillFlowContainer infoFlow;
|
||||||
private readonly IEnumerable<SpriteText> descriptionSprites;
|
|
||||||
|
|
||||||
public Action<Drawable> OnSpriteLoadComplete;
|
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.Anchor = Anchor.TopCentre;
|
||||||
s.Origin = Anchor.TopCentre;
|
s.Origin = Anchor.TopCentre;
|
||||||
@ -120,9 +119,7 @@ namespace osu.Game.Overlays.MedalSplash
|
|||||||
private void load(OsuColour colours, TextureStore textures)
|
private void load(OsuColour colours, TextureStore textures)
|
||||||
{
|
{
|
||||||
medalGlow.Texture = textures.Get(@"MedalSplash/medal-glow");
|
medalGlow.Texture = textures.Get(@"MedalSplash/medal-glow");
|
||||||
|
description.Colour = colours.BlueLight;
|
||||||
foreach (var s in descriptionSprites)
|
|
||||||
s.Colour = colours.BlueLight;
|
|
||||||
|
|
||||||
unlocked.Position = new Vector2(0f, medalContainer.Size.Y / 2 + 10);
|
unlocked.Position = new Vector2(0f, medalContainer.Size.Y / 2 + 10);
|
||||||
infoFlow.Position = new Vector2(0f, unlocked.Position.Y + 90);
|
infoFlow.Position = new Vector2(0f, unlocked.Position.Y + 90);
|
||||||
|
Loading…
Reference in New Issue
Block a user