diff --git a/osu.Game/Screens/Edit/Compose/Components/Timeline/Timeline.cs b/osu.Game/Screens/Edit/Compose/Components/Timeline/Timeline.cs index c866fb38c8..21eb4b08b0 100644 --- a/osu.Game/Screens/Edit/Compose/Components/Timeline/Timeline.cs +++ b/osu.Game/Screens/Edit/Compose/Components/Timeline/Timeline.cs @@ -173,7 +173,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline [Resolved] private EditorBeatmap beatmap { get; set; } - public (Vector2 position, double time) GetSnappedPosition(Vector2 position, double time) => (position, time); + public (Vector2 position, double time) GetSnappedPosition(Vector2 position, double time) => (position, (position.X / Content.DrawWidth) * track.Length); public float GetBeatSnapDistanceAt(double referenceTime) { diff --git a/osu.Game/Screens/Edit/Compose/Components/Timeline/TimelineHitObjectDisplay.cs b/osu.Game/Screens/Edit/Compose/Components/Timeline/TimelineHitObjectDisplay.cs index 7101fac310..5e6403bb05 100644 --- a/osu.Game/Screens/Edit/Compose/Components/Timeline/TimelineHitObjectDisplay.cs +++ b/osu.Game/Screens/Edit/Compose/Components/Timeline/TimelineHitObjectDisplay.cs @@ -67,6 +67,13 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline base.Update(); } + protected override SelectionHandler CreateSelectionHandler() => new TimelineSelectionHandler(); + + internal class TimelineSelectionHandler : SelectionHandler + { + public override bool HandleMovement(MoveSelectionEvent moveEvent) => true; + } + protected override SelectionBlueprint CreateBlueprintFor(HitObject hitObject) => new TimelineHitObjectBlueprint(hitObject); protected override DragBox CreateDragBox(Action performSelect) => new TimelineDragBox(performSelect); @@ -212,6 +219,8 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline circleQuad.BottomLeft, Vector2.ComponentMax(actualQuad.BottomRight, circleQuad.BottomRight)); } } + + public override Vector2 SelectionPoint => ScreenSpaceDrawQuad.TopLeft; } } }