Merge branch 'i-beat-snapping' into timeline-maybe

This commit is contained in:
Dean Herbert
2020-01-23 15:37:54 +09:00
99 changed files with 467 additions and 322 deletions

View File

@ -148,10 +148,10 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
return false;
}
protected override bool OnMouseUp(MouseUpEvent e)
protected override void OnMouseUp(MouseUpEvent e)
{
endUserDrag();
return base.OnMouseUp(e);
base.OnMouseUp(e);
}
private void beginUserDrag()
@ -177,7 +177,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
public (Vector2 position, double time) GetSnappedPosition(Vector2 position, double time)
{
var targetTime = (position.X / Content.DrawWidth) * track.Length;
return (position, beatSnapProvider.SnapTime(targetTime, targetTime, beatSnapProvider.BeatDivisor));
return (position, beatSnapProvider.SnapTime(targetTime, targetTime));
}
public float GetBeatSnapDistanceAt(double referenceTime) => throw new NotImplementedException();

View File

@ -50,7 +50,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
DragBox.Alpha = 0;
}
protected override bool OnDrag(DragEvent e)
protected override void OnDrag(DragEvent e)
{
if (timeline != null)
{
@ -64,14 +64,14 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
timeline.ScrollBy((float)((mouseX - timelineQuad.TopLeft.X) / 10 * Clock.ElapsedFrameTime));
}
base.OnDrag(e);
lastDragEvent = e;
return base.OnDrag(e);
}
protected override bool OnDragEnd(DragEndEvent e)
protected override void OnDragEnd(DragEndEvent e)
{
base.OnDragEnd(e);
lastDragEvent = null;
return base.OnDragEnd(e);
}
protected override void Update()