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