From 75344f9c5c7ad67aa82df35aa6f3d8b0a6041b74 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 10 Jul 2024 19:28:25 +0900 Subject: [PATCH] Fix break overlay progress bar becoming a pancake near end of break --- osu.Game/Screens/Play/BreakOverlay.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/osu.Game/Screens/Play/BreakOverlay.cs b/osu.Game/Screens/Play/BreakOverlay.cs index e18612c955..ece3105b42 100644 --- a/osu.Game/Screens/Play/BreakOverlay.cs +++ b/osu.Game/Screens/Play/BreakOverlay.cs @@ -3,6 +3,7 @@ #nullable disable +using System; using System.Collections.Generic; using osu.Framework.Bindables; using osu.Framework.Graphics; @@ -75,15 +76,13 @@ namespace osu.Game.Screens.Play 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 @@ -119,6 +118,13 @@ namespace osu.Game.Screens.Play } } + protected override void Update() + { + base.Update(); + + remainingTimeBox.Height = Math.Min(8, remainingTimeBox.DrawWidth); + } + private void initializeBreaks() { FinishTransforms(true);