1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 20:07:29 +08:00

Hide adjustment when no adjustment is applied

This commit is contained in:
Dean Herbert 2022-03-04 15:19:55 +09:00
parent 8c7b1e0aa8
commit 5a164e4520

View File

@ -250,8 +250,13 @@ namespace osu.Game.Screens.Ranking.Statistics
public void UpdateOffset(float adjustment)
{
bool hasAdjustment = adjustment != value;
if (boxAdjustment == null)
{
if (!hasAdjustment)
return;
AddInternal(boxAdjustment = new Circle
{
RelativeSizeAxes = Axes.Both,
@ -265,6 +270,7 @@ namespace osu.Game.Screens.Ranking.Statistics
}
boxAdjustment.ResizeHeightTo(Math.Clamp(adjustment / maxValue, 0.05f, 1), duration, Easing.OutQuint);
boxAdjustment.FadeTo(!hasAdjustment ? 0 : 1, duration, Easing.OutQuint);
}
}
}