mirror of
https://github.com/ppy/osu
synced 2025-03-21 18:38:25 +00:00
Add comment about custom SelectionHandler
This commit is contained in:
parent
5cadbb1ffb
commit
5646f7777e
@ -82,15 +82,16 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
|
|
||||||
protected override SelectionHandler CreateSelectionHandler() => new TimelineSelectionHandler();
|
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 SelectionBlueprint CreateBlueprintFor(HitObject hitObject) => new TimelineHitObjectBlueprint(hitObject);
|
||||||
|
|
||||||
protected override DragBox CreateDragBox(Action<RectangleF> performSelect) => new TimelineDragBox(performSelect);
|
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 class TimelineDragBox : DragBox
|
||||||
{
|
{
|
||||||
private Vector2 lastMouseDown;
|
private Vector2 lastMouseDown;
|
||||||
|
Loading…
Reference in New Issue
Block a user