// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Game.Rulesets.Edit; using osuTK; namespace osu.Game.Screens.Edit.Compose.Components { /// /// An event which occurs when a is moved. /// public class MoveSelectionEvent { /// /// The that triggered this . /// public readonly OverlaySelectionBlueprint Blueprint; /// /// The starting screen-space position of the hitobject. /// public readonly Vector2 ScreenSpaceStartPosition; /// /// The expected screen-space position of the hitobject at the current cursor position. /// public readonly Vector2 ScreenSpacePosition; /// /// The distance between and the hitobject's current position, in the coordinate-space of the hitobject's parent. /// /// /// This does not use and does not represent the cumulative movement distance. /// public readonly Vector2 InstantDelta; public MoveSelectionEvent(OverlaySelectionBlueprint blueprint, Vector2 screenSpaceStartPosition, Vector2 screenSpacePosition) { Blueprint = blueprint; ScreenSpaceStartPosition = screenSpaceStartPosition; ScreenSpacePosition = screenSpacePosition; InstantDelta = Blueprint.DrawableObject.Parent.ToLocalSpace(ScreenSpacePosition) - Blueprint.DrawableObject.Position; } } }