1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-16 02:15:17 +08:00

Add comment about custom SelectionHandler

This commit is contained in:
Dean Herbert 2020-01-23 16:23:42 +09:00
parent 5cadbb1ffb
commit 5646f7777e

View File

@ -82,15 +82,16 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
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);
internal class TimelineSelectionHandler : SelectionHandler
{
// for now we always allow movement. snapping is provided by the Timeline's "distance" snap implementation
public override bool HandleMovement(MoveSelectionEvent moveEvent) => true;
}
private class TimelineDragBox : DragBox
{
private Vector2 lastMouseDown;