Move selection relative to the hitobject start positions

This commit is contained in:
smoogipoo
2019-10-08 18:57:03 +09:00
parent dba526279e
commit 08d043f447
7 changed files with 87 additions and 18 deletions

View File

@ -216,7 +216,14 @@ namespace osu.Game.Screens.Edit.Compose.Components
private void onSelectionRequested(SelectionBlueprint blueprint, InputState state) => selectionHandler.HandleSelectionRequested(blueprint, state);
private void onDragRequested(SelectionBlueprint blueprint, DragEvent dragEvent) => selectionHandler.HandleDrag(blueprint, dragEvent);
private void onDragRequested(SelectionBlueprint blueprint, DragEvent dragEvent)
{
var dragPosition = blueprint.ScreenSpaceDragStartPosition + dragEvent.ScreenSpaceMousePosition - dragEvent.ScreenSpaceMouseDownPosition;
// Todo: Snap dragPosition
selectionHandler.HandleDrag(blueprint, new SelectionDragEvent(blueprint, blueprint.ScreenSpaceDragStartPosition, dragPosition));
}
protected override void Dispose(bool isDisposing)
{