Skip to content

Commit

Permalink
Merge pull request #28803 from peppy/fix-break-overlay-visuals
Browse files Browse the repository at this point in the history
Fix break overlay progress bar becoming a pancake near end of break
  • Loading branch information
bdach authored Jul 10, 2024
2 parents d9e2853 + 75344f9 commit d879527
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions osu.Game/Screens/Play/BreakOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#nullable disable

using System;
using System.Collections.Generic;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
Expand Down Expand Up @@ -75,15 +76,13 @@ public BreakOverlay(bool letterboxing, ScoreProcessor scoreProcessor)
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
Width = 0,
Child = remainingTimeBox = new Container
Child = remainingTimeBox = new Circle
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.X,
Height = 8,
CornerRadius = 4,
Masking = true,
Child = new Box { RelativeSizeAxes = Axes.Both }
}
},
remainingTimeCounter = new RemainingTimeCounter
Expand Down Expand Up @@ -119,6 +118,13 @@ protected override void LoadComplete()
}
}

protected override void Update()
{
base.Update();

remainingTimeBox.Height = Math.Min(8, remainingTimeBox.DrawWidth);
}

private void initializeBreaks()
{
FinishTransforms(true);
Expand Down

0 comments on commit d879527

Please sign in to comment.