diff --git a/osu.Game/Overlays/Toolbar/AnalogClockDisplay.cs b/osu.Game/Overlays/Toolbar/AnalogClockDisplay.cs index a5ed0d65bd..000afd2c1d 100644 --- a/osu.Game/Overlays/Toolbar/AnalogClockDisplay.cs +++ b/osu.Game/Overlays/Toolbar/AnalogClockDisplay.cs @@ -70,8 +70,18 @@ namespace osu.Game.Overlays.Toolbar float rotation = fraction * 360 - 90; + // The case where a hand is completing a rotation. + // Animate and then move back one full rotation so we don't need to track outside of 0..360 if (Math.Abs(hand.Rotation - rotation) > 180) - hand.RotateTo(rotation); + { + float animRotation = rotation; + while (animRotation < hand.Rotation) + animRotation += 180; + + hand.RotateTo(animRotation, duration, Easing.OutElastic) + .Then() + .RotateTo(rotation); + } else hand.RotateTo(rotation, duration, Easing.OutElastic); } diff --git a/osu.Game/Overlays/Toolbar/ClockDisplay.cs b/osu.Game/Overlays/Toolbar/ClockDisplay.cs index c72c92b61b..0b223c6038 100644 --- a/osu.Game/Overlays/Toolbar/ClockDisplay.cs +++ b/osu.Game/Overlays/Toolbar/ClockDisplay.cs @@ -10,6 +10,14 @@ namespace osu.Game.Overlays.Toolbar { private int? lastSecond; + protected override void LoadComplete() + { + base.LoadComplete(); + + UpdateDisplay(DateTimeOffset.Now); + FinishTransforms(true); + } + protected override void Update() { base.Update();