From f8faea8da28644b5d10c27a06304acfc4b1ffc72 Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Fri, 28 Apr 2017 16:02:00 +0300 Subject: [PATCH] Removed unnecessary nested class --- osu.Game/Screens/Play/SongProgressInfo.cs | 37 +++++++++-------------- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/osu.Game/Screens/Play/SongProgressInfo.cs b/osu.Game/Screens/Play/SongProgressInfo.cs index fa179d05c1..1a36f1bd42 100644 --- a/osu.Game/Screens/Play/SongProgressInfo.cs +++ b/osu.Game/Screens/Play/SongProgressInfo.cs @@ -12,9 +12,9 @@ namespace osu.Game.Screens.Play { public class SongProgressInfo : Container { - private readonly InfoText timeCurrent; - private readonly InfoText timeLeft; - private readonly InfoText progress; + private OsuSpriteText timeCurrent; + private OsuSpriteText timeLeft; + private OsuSpriteText progress; 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[] { - timeCurrent = new InfoText + timeCurrent = new OsuSpriteText { Origin = Anchor.BottomLeft, Anchor = Anchor.BottomLeft, + Colour = colours.BlueLighter, + Font = @"Venera", Margin = new MarginPadding { Left = margin, }, }, - progress = new InfoText + progress = new OsuSpriteText { Origin = Anchor.BottomCentre, Anchor = Anchor.BottomCentre, + Colour = colours.BlueLighter, + Font = @"Venera", }, - timeLeft = new InfoText + timeLeft = new OsuSpriteText { Origin = Anchor.BottomRight, Anchor = Anchor.BottomRight, + Colour = colours.BlueLighter, + Font = @"Venera", Margin = new MarginPadding { 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, - }; - } - } } }