mirror of
https://github.com/ppy/osu
synced 2024-12-15 03:16:17 +00:00
Allow basic timeline selection temporal movement
This commit is contained in:
parent
cb6e7425ae
commit
53bdf72592
@ -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)
|
||||
{
|
||||
|
@ -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<RectangleF> 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user