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:
parent
ea0631ede8
commit
98544a8077
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user