Handle selection events in timeline

This commit is contained in:
Dean Herbert 2020-01-21 17:37:35 +09:00
parent 79351976d5
commit 353b74b04a

View File

@ -49,15 +49,6 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
return new TimelineHitObjectRepresentation(hitObject) { Y = -yOffset * TimelineHitObjectRepresentation.THICKNESS }; return new TimelineHitObjectRepresentation(hitObject) { Y = -yOffset * TimelineHitObjectRepresentation.THICKNESS };
} }
protected override bool OnMouseDown(MouseDownEvent e)
{
base.OnMouseDown(e);
return false; // temporary until we correctly handle selections.
}
protected override DragBox CreateDragBox(Action<RectangleF> performSelect) => new NoDragDragBox(performSelect);
internal class NoDragDragBox : DragBox internal class NoDragDragBox : DragBox
{ {
public NoDragDragBox(Action<RectangleF> performSelect) public NoDragDragBox(Action<RectangleF> performSelect)
@ -74,6 +65,8 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
public const float THICKNESS = 3; public const float THICKNESS = 3;
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => base.ReceivePositionalInputAt(screenSpacePos) || circle.ReceivePositionalInputAt(screenSpacePos);
public TimelineHitObjectRepresentation(HitObject hitObject) public TimelineHitObjectRepresentation(HitObject hitObject)
: base(hitObject) : base(hitObject)
{ {