1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 08:02:55 +08:00

Allow context menus to be triggered as well

This commit is contained in:
Derrick Timmermans 2021-07-21 12:04:09 +02:00
parent f85ff40a6b
commit 9d43ca122f
No known key found for this signature in database
GPG Key ID: 8681B60806EF4A17

View File

@ -238,6 +238,11 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
internal class TimelineSelectionHandler : EditorSelectionHandler, IKeyBindingHandler<GlobalAction>
{
[Resolved]
private Timeline timeline { get; set; }
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => timeline.ScreenSpaceDrawQuad.Contains(screenSpacePos);
// for now we always allow movement. snapping is provided by the Timeline's "distance" snap implementation
public override bool HandleMovement(MoveSelectionEvent<HitObject> moveEvent) => true;