diff --git a/osu.Game/Screens/Play/BreaksOverlay/ArrowsOverlay.cs b/osu.Game/Screens/Play/BreaksOverlay/ArrowsOverlay.cs index 87dc8caf13..9d729826de 100644 --- a/osu.Game/Screens/Play/BreaksOverlay/ArrowsOverlay.cs +++ b/osu.Game/Screens/Play/BreaksOverlay/ArrowsOverlay.cs @@ -35,7 +35,7 @@ namespace osu.Game.Screens.Play.BreaksOverlay { Anchor = Anchor.Centre, Origin = Anchor.CentreRight, - X = - glow_icon_offscreen_offset, + X = -glow_icon_offscreen_offset, Icon = Graphics.FontAwesome.fa_chevron_right, BlurSigma = new Vector2(glow_icon_blur_sigma), Size = new Vector2(glow_icon_size), @@ -59,7 +59,7 @@ namespace osu.Game.Screens.Play.BreaksOverlay Anchor = Anchor.Centre, Origin = Anchor.CentreRight, Alpha = 0.7f, - X = - blurred_icon_offscreen_offset, + X = -blurred_icon_offscreen_offset, Icon = Graphics.FontAwesome.fa_chevron_right, BlurSigma = new Vector2(blurred_icon_blur_sigma), Size = new Vector2(blurred_icon_size), diff --git a/osu.Game/Screens/Play/BreaksOverlay/BreakOverlay.cs b/osu.Game/Screens/Play/BreaksOverlay/BreakOverlay.cs index 33fcebf3bb..90321df9d6 100644 --- a/osu.Game/Screens/Play/BreaksOverlay/BreakOverlay.cs +++ b/osu.Game/Screens/Play/BreaksOverlay/BreakOverlay.cs @@ -104,7 +104,7 @@ namespace osu.Game.Screens.Play.BreaksOverlay .Then() .ResizeWidthTo(0, b.Duration - fade_duration); - Scheduler.AddDelayed(() => remainingTimeCounter.StartCounting(b.EndTime), b.StartTime); + Scheduler.AddDelayed(() => remainingTimeCounter.StartCounting(b.EndTime), b.StartTime - Clock.CurrentTime); remainingTimeCounter.FadeIn(fade_duration); info.FadeIn(fade_duration); diff --git a/osu.Game/Screens/Play/BreaksOverlay/InfoContainer.cs b/osu.Game/Screens/Play/BreaksOverlay/InfoContainer.cs index 4cff9372a3..8d2bec06aa 100644 --- a/osu.Game/Screens/Play/BreaksOverlay/InfoContainer.cs +++ b/osu.Game/Screens/Play/BreaksOverlay/InfoContainer.cs @@ -26,7 +26,7 @@ namespace osu.Game.Screens.Play.BreaksOverlay { Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, - Text = @"current progress".ToUpper(), + Text = "current progress".ToUpper(), TextSize = 15, Font = "Exo2.0-Black", }, @@ -38,9 +38,9 @@ namespace osu.Game.Screens.Play.BreaksOverlay Direction = FillDirection.Vertical, Children = new Drawable[] { - AccuracyDisplay = new PercentageInfoLine(@"Accuracy"), - RankDisplay = new InfoLine(@"Rank", @"#"), - GradeDisplay = new GradeInfoLine(@"Grade"), + AccuracyDisplay = new PercentageInfoLine("Accuracy"), + RankDisplay = new InfoLine("Rank", @"#"), + GradeDisplay = new GradeInfoLine("Grade"), }, } }; diff --git a/osu.Game/Screens/Play/BreaksOverlay/LetterboxOverlay.cs b/osu.Game/Screens/Play/BreaksOverlay/LetterboxOverlay.cs index c95b15ef3a..1581c45c56 100644 --- a/osu.Game/Screens/Play/BreaksOverlay/LetterboxOverlay.cs +++ b/osu.Game/Screens/Play/BreaksOverlay/LetterboxOverlay.cs @@ -11,9 +11,9 @@ namespace osu.Game.Screens.Play.BreaksOverlay { public class LetterboxOverlay : Container { - private const int letterbox_height = 350; + private const int height = 350; - private Color4 transparentBlack => new Color4(0, 0, 0, 0); + private static readonly Color4 transparent_black = new Color4(0, 0, 0, 0); public LetterboxOverlay() { @@ -26,7 +26,7 @@ namespace osu.Game.Screens.Play.BreaksOverlay Anchor = Anchor.TopLeft, Origin = Anchor.TopLeft, RelativeSizeAxes = Axes.X, - Height = letterbox_height, + Height = height, Child = new Box { RelativeSizeAxes = Axes.Both, @@ -34,8 +34,8 @@ namespace osu.Game.Screens.Play.BreaksOverlay { TopLeft = Color4.Black, TopRight = Color4.Black, - BottomLeft = transparentBlack, - BottomRight = transparentBlack, + BottomLeft = transparent_black, + BottomRight = transparent_black, } } }, @@ -44,14 +44,14 @@ namespace osu.Game.Screens.Play.BreaksOverlay Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, RelativeSizeAxes = Axes.X, - Height = letterbox_height, + Height = height, Child = new Box { RelativeSizeAxes = Axes.Both, Colour = new ColourInfo { - TopLeft = transparentBlack, - TopRight = transparentBlack, + TopLeft = transparent_black, + TopRight = transparent_black, BottomLeft = Color4.Black, BottomRight = Color4.Black, } diff --git a/osu.Game/Screens/Play/BreaksOverlay/RemainingTimeCounter.cs b/osu.Game/Screens/Play/BreaksOverlay/RemainingTimeCounter.cs index ab6ee5ea5c..e89c1e292c 100644 --- a/osu.Game/Screens/Play/BreaksOverlay/RemainingTimeCounter.cs +++ b/osu.Game/Screens/Play/BreaksOverlay/RemainingTimeCounter.cs @@ -14,7 +14,7 @@ namespace osu.Game.Screens.Play.BreaksOverlay private int? previousSecond; - private double remainingTime; + private double endTime; private bool isCounting; @@ -31,9 +31,9 @@ namespace osu.Game.Screens.Play.BreaksOverlay }; } - public void StartCounting(double remainingTime) + public void StartCounting(double endTime) { - this.remainingTime = remainingTime; + this.endTime = endTime; isCounting = true; } @@ -44,9 +44,9 @@ namespace osu.Game.Screens.Play.BreaksOverlay if (isCounting) { var currentTime = Clock.CurrentTime; - if (currentTime < remainingTime) + if (currentTime < endTime) { - int currentSecond = (int)Math.Floor((remainingTime - Clock.CurrentTime) / 1000.0); + int currentSecond = (int)Math.Floor((endTime - Clock.CurrentTime) / 1000.0); if (currentSecond != previousSecond) { counter.Text = currentSecond.ToString();