mirror of
https://github.com/ppy/osu
synced 2024-12-11 09:27:08 +00:00
Apply suggested shrinking bar changes
This commit is contained in:
parent
2bc8fe027b
commit
96fcc095eb
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user