Removed unnecessary nested class

This commit is contained in:
EVAST9919 2017-04-28 16:02:00 +03:00
parent c4bd21914d
commit f8faea8da2

View File

@ -12,9 +12,9 @@ namespace osu.Game.Screens.Play
{ {
public class SongProgressInfo : Container public class SongProgressInfo : Container
{ {
private readonly InfoText timeCurrent; private OsuSpriteText timeCurrent;
private readonly InfoText timeLeft; private OsuSpriteText timeLeft;
private readonly InfoText progress; private OsuSpriteText progress;
private const int margin = 10; private const int margin = 10;
@ -41,28 +41,35 @@ namespace osu.Game.Screens.Play
} }
} }
public SongProgressInfo() [BackgroundDependencyLoader]
private void load(OsuColour colours)
{ {
Children = new Drawable[] Children = new Drawable[]
{ {
timeCurrent = new InfoText timeCurrent = new OsuSpriteText
{ {
Origin = Anchor.BottomLeft, Origin = Anchor.BottomLeft,
Anchor = Anchor.BottomLeft, Anchor = Anchor.BottomLeft,
Colour = colours.BlueLighter,
Font = @"Venera",
Margin = new MarginPadding Margin = new MarginPadding
{ {
Left = margin, Left = margin,
}, },
}, },
progress = new InfoText progress = new OsuSpriteText
{ {
Origin = Anchor.BottomCentre, Origin = Anchor.BottomCentre,
Anchor = Anchor.BottomCentre, Anchor = Anchor.BottomCentre,
Colour = colours.BlueLighter,
Font = @"Venera",
}, },
timeLeft = new InfoText timeLeft = new OsuSpriteText
{ {
Origin = Anchor.BottomRight, Origin = Anchor.BottomRight,
Anchor = Anchor.BottomRight, Anchor = Anchor.BottomRight,
Colour = colours.BlueLighter,
Font = @"Venera",
Margin = new MarginPadding Margin = new MarginPadding
{ {
Right = margin, Right = margin,
@ -70,21 +77,5 @@ namespace osu.Game.Screens.Play
} }
}; };
} }
private class InfoText : OsuSpriteText
{
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
Colour = colours.BlueLighter;
Font = @"Venera";
EdgeEffect = new EdgeEffect
{
Colour = colours.BlueDarker,
Type = EdgeEffectType.Glow,
Radius = 5,
};
}
}
} }
} }