mirror of
https://github.com/ppy/osu.git
synced 2025-01-31 23:02:54 +08:00
30 lines
829 B
C#
30 lines
829 B
C#
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||
|
|
||
|
using System.Linq;
|
||
|
using osu.Framework.Input.Events;
|
||
|
using osu.Game.Rulesets.Osu.Objects;
|
||
|
using osu.Game.Screens.Edit.Compose.Components;
|
||
|
|
||
|
namespace osu.Game.Rulesets.Osu.Edit
|
||
|
{
|
||
|
public class OsuSelectionBox : SelectionBox
|
||
|
{
|
||
|
public override void HandleDrag(DragEvent dragEvent)
|
||
|
{
|
||
|
base.HandleDrag(dragEvent);
|
||
|
|
||
|
foreach (var h in SelectedHitObjects.OfType<OsuHitObject>())
|
||
|
{
|
||
|
if (h is Spinner)
|
||
|
{
|
||
|
// Spinners don't support position adjustments
|
||
|
continue;
|
||
|
}
|
||
|
|
||
|
h.Position += dragEvent.Delta;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|