2019-01-24 16:43:03 +08:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-11-16 16:12:24 +08:00
|
|
|
|
|
|
|
using System.Linq;
|
|
|
|
using osu.Game.Rulesets.Osu.Objects;
|
|
|
|
using osu.Game.Screens.Edit.Compose.Components;
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Osu.Edit
|
|
|
|
{
|
2018-11-19 15:58:11 +08:00
|
|
|
public class OsuSelectionHandler : SelectionHandler
|
2018-11-16 16:12:24 +08:00
|
|
|
{
|
2019-10-08 18:08:23 +08:00
|
|
|
public override void HandleMovement(MoveSelectionEvent moveEvent)
|
2018-11-16 16:12:24 +08:00
|
|
|
{
|
|
|
|
foreach (var h in SelectedHitObjects.OfType<OsuHitObject>())
|
|
|
|
{
|
|
|
|
if (h is Spinner)
|
|
|
|
{
|
|
|
|
// Spinners don't support position adjustments
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2019-10-08 18:08:23 +08:00
|
|
|
h.Position += moveEvent.InstantDelta;
|
2018-11-16 16:12:24 +08:00
|
|
|
}
|
2018-11-26 15:08:56 +08:00
|
|
|
|
2019-10-08 18:08:23 +08:00
|
|
|
base.HandleMovement(moveEvent);
|
2018-11-16 16:12:24 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|