1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 19:53:23 +08:00

Fix unsynchronised tweening.

This commit is contained in:
Dean Herbert 2017-04-14 19:20:07 +09:00
parent ea0631ede8
commit 98544a8077
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49

View File

@ -59,7 +59,7 @@ namespace osu.Game.Overlays
{ {
if (IsSeeking || !IsEnabled) return; if (IsSeeking || !IsEnabled) return;
updatePosition(position); updatePosition(position, false);
} }
private void seek(InputState state) private void seek(InputState state)
@ -72,10 +72,10 @@ namespace osu.Game.Overlays
updatePosition(seekLocation); updatePosition(seekLocation);
} }
private void updatePosition(float position) private void updatePosition(float position, bool easing = true)
{ {
position = MathHelper.Clamp(position, 0, 1); position = MathHelper.Clamp(position, 0, 1);
Fill.TransformTo(() => Fill.Width, position, 200, EasingTypes.OutQuint, new TransformSeek()); Fill.TransformTo(() => Fill.Width, position, easing ? 200 : 0, EasingTypes.OutQuint, new TransformSeek());
} }
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)