Apply suggested shrinking bar changes

This commit is contained in:
EVAST9919
2017-10-06 04:49:16 +03:00
parent 2bc8fe027b
commit 96fcc095eb

View File

@ -33,6 +33,7 @@ namespace osu.Game.Screens.Play.BreaksOverlay
private readonly bool letterboxing; private readonly bool letterboxing;
private readonly LetterboxOverlay letterboxOverlay; private readonly LetterboxOverlay letterboxOverlay;
private readonly Container remainingTimeAdjustmentBox;
private readonly Container remainingTimeBox; private readonly Container remainingTimeBox;
private readonly RemainingTimeCounter remainingTimeCounter; private readonly RemainingTimeCounter remainingTimeCounter;
private readonly InfoContainer info; private readonly InfoContainer info;
@ -50,15 +51,23 @@ namespace osu.Game.Screens.Play.BreaksOverlay
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
}, },
remainingTimeBox = new Container remainingTimeAdjustmentBox = new Container
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
Width = 0,
Child = remainingTimeBox = new Container
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Size = new Vector2(0, 8), Height = 8,
CornerRadius = 4, CornerRadius = 4,
Masking = true, Masking = true,
Child = new Box { RelativeSizeAxes = Axes.Both } Child = new Box { RelativeSizeAxes = Axes.Both }
}
}, },
remainingTimeCounter = new RemainingTimeCounter remainingTimeCounter = new RemainingTimeCounter
{ {
@ -107,10 +116,15 @@ namespace osu.Game.Screens.Play.BreaksOverlay
if (letterboxing) if (letterboxing)
letterboxOverlay.Show(); letterboxOverlay.Show();
remainingTimeBox remainingTimeAdjustmentBox
.ResizeWidthTo(remaining_time_container_max_size, fade_duration, Easing.OutQuint) .ResizeWidthTo(remaining_time_container_max_size, fade_duration, Easing.OutQuint)
.Delay(b.Duration - fade_duration)
.ResizeWidthTo(0);
remainingTimeBox
.ResizeWidthTo(0, b.Duration - fade_duration)
.Then() .Then()
.ResizeWidthTo(0, b.Duration - fade_duration * 2); .ResizeWidthTo(1);
remainingTimeCounter.StartCounting(b.EndTime); remainingTimeCounter.StartCounting(b.EndTime);