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:
parent
8c7b1e0aa8
commit
5a164e4520
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user