Allow basic timeline selection temporal movement

This commit is contained in:
Dean Herbert 2020-01-22 21:37:06 +09:00
parent cb6e7425ae
commit 53bdf72592
2 changed files with 10 additions and 1 deletions

View File

@ -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)
{

View File

@ -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;
}
}
}