diff --git a/osu.Game/Rulesets/Edit/HitObjectComposer.cs b/osu.Game/Rulesets/Edit/HitObjectComposer.cs
index 35852f60ea..e927951d0a 100644
--- a/osu.Game/Rulesets/Edit/HitObjectComposer.cs
+++ b/osu.Game/Rulesets/Edit/HitObjectComposer.cs
@@ -332,7 +332,7 @@ public void EndPlacement(HitObject hitObject, bool commit)
EditorBeatmap.Add(hitObject);
if (EditorClock.CurrentTime < hitObject.StartTime)
- EditorClock.SeekTo(hitObject.StartTime);
+ EditorClock.SeekSmoothlyTo(hitObject.StartTime);
}
}
diff --git a/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/MarkerPart.cs b/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/MarkerPart.cs
index 9e9ac93d23..5a2214509c 100644
--- a/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/MarkerPart.cs
+++ b/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/MarkerPart.cs
@@ -58,7 +58,7 @@ private void seekToPosition(Vector2 screenPosition)
return;
float markerPos = Math.Clamp(ToLocalSpace(screenPosition).X, 0, DrawWidth);
- editorClock.SeekTo(markerPos / DrawWidth * editorClock.TrackLength);
+ editorClock.SeekSmoothlyTo(markerPos / DrawWidth * editorClock.TrackLength);
});
}
diff --git a/osu.Game/Screens/Edit/Compose/Components/BlueprintContainer.cs b/osu.Game/Screens/Edit/Compose/Components/BlueprintContainer.cs
index 0b45bd5597..5371beac60 100644
--- a/osu.Game/Screens/Edit/Compose/Components/BlueprintContainer.cs
+++ b/osu.Game/Screens/Edit/Compose/Components/BlueprintContainer.cs
@@ -170,7 +170,7 @@ protected override bool OnDoubleClick(DoubleClickEvent e)
if (clickedBlueprint == null || SelectionHandler.SelectedBlueprints.FirstOrDefault(b => b.IsHovered) != clickedBlueprint)
return false;
- EditorClock?.SeekTo(clickedBlueprint.HitObject.StartTime);
+ EditorClock?.SeekSmoothlyTo(clickedBlueprint.HitObject.StartTime);
return true;
}
diff --git a/osu.Game/Screens/Edit/EditorClock.cs b/osu.Game/Screens/Edit/EditorClock.cs
index 148eef6c93..c651d6a7c4 100644
--- a/osu.Game/Screens/Edit/EditorClock.cs
+++ b/osu.Game/Screens/Edit/EditorClock.cs
@@ -111,7 +111,7 @@ private void seek(int direction, bool snapped, double amount = 1)
if (!snapped || ControlPointInfo.TimingPoints.Count == 0)
{
- SeekTo(seekTime);
+ SeekSmoothlyTo(seekTime);
return;
}
@@ -145,11 +145,11 @@ private void seek(int direction, bool snapped, double amount = 1)
// Ensure the sought point is within the boundaries
seekTime = Math.Clamp(seekTime, 0, TrackLength);
- SeekTo(seekTime);
+ SeekSmoothlyTo(seekTime);
}
///
- /// The current time of this clock, include any active transform seeks performed via .
+ /// The current time of this clock, include any active transform seeks performed via .
///
public double CurrentTimeAccurate =>
Transforms.OfType().FirstOrDefault()?.EndValue ?? CurrentTime;
@@ -182,6 +182,23 @@ public bool Seek(double position)
return underlyingClock.Seek(position);
}
+ ///
+ /// Seek smoothly to the provided destination.
+ /// Use to perform an immediate seek.
+ ///
+ ///
+ public void SeekSmoothlyTo(double seekDestination)
+ {
+ seekingOrStopped.Value = true;
+
+ if (IsRunning)
+ Seek(seekDestination);
+ else
+ {
+ transformSeekTo(seekDestination, transform_time, Easing.OutQuint);
+ }
+ }
+
public void ResetSpeedAdjustments() => underlyingClock.ResetSpeedAdjustments();
double IAdjustableClock.Rate
@@ -243,16 +260,6 @@ private void updateSeekingState()
}
}
- public void SeekTo(double seekDestination)
- {
- seekingOrStopped.Value = true;
-
- if (IsRunning)
- Seek(seekDestination);
- else
- transformSeekTo(seekDestination, transform_time, Easing.OutQuint);
- }
-
private void transformSeekTo(double seek, double duration = 0, Easing easing = Easing.None)
=> this.TransformTo(this.PopulateTransform(new TransformSeek(), seek, duration, easing));
diff --git a/osu.Game/Screens/Edit/Timing/ControlPointTable.cs b/osu.Game/Screens/Edit/Timing/ControlPointTable.cs
index 89d3c36250..e4b9150df1 100644
--- a/osu.Game/Screens/Edit/Timing/ControlPointTable.cs
+++ b/osu.Game/Screens/Edit/Timing/ControlPointTable.cs
@@ -206,7 +206,7 @@ public RowBackground(ControlPointGroup controlGroup)
Action = () =>
{
selectedGroup.Value = controlGroup;
- clock.SeekTo(controlGroup.Time);
+ clock.SeekSmoothlyTo(controlGroup.Time);
};
}