2019-10-08 18:08:23 +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.
|
|
|
|
|
|
|
|
using osu.Game.Rulesets.Edit;
|
|
|
|
using osuTK;
|
|
|
|
|
|
|
|
namespace osu.Game.Screens.Edit.Compose.Components
|
|
|
|
{
|
|
|
|
/// <summary>
|
2021-05-18 12:02:23 +08:00
|
|
|
/// An event which occurs when a <see cref="SelectionBlueprint"/> is moved.
|
2019-10-08 18:08:23 +08:00
|
|
|
/// </summary>
|
2021-04-27 14:40:35 +08:00
|
|
|
public class MoveSelectionEvent<T>
|
2019-10-08 18:08:23 +08:00
|
|
|
{
|
|
|
|
/// <summary>
|
2021-04-27 14:40:35 +08:00
|
|
|
/// The <see cref="SelectionBlueprint{T}"/> that triggered this <see cref="MoveSelectionEvent{T}"/>.
|
2019-10-08 18:08:23 +08:00
|
|
|
/// </summary>
|
2021-04-27 14:40:35 +08:00
|
|
|
public readonly SelectionBlueprint<T> Blueprint;
|
2019-10-08 18:08:23 +08:00
|
|
|
|
|
|
|
/// <summary>
|
2021-04-29 14:29:25 +08:00
|
|
|
/// The screen-space delta of this move event.
|
2019-10-08 18:08:23 +08:00
|
|
|
/// </summary>
|
2021-04-29 14:29:25 +08:00
|
|
|
public readonly Vector2 ScreenSpaceDelta;
|
2019-10-08 18:08:23 +08:00
|
|
|
|
2021-04-29 14:29:25 +08:00
|
|
|
public MoveSelectionEvent(SelectionBlueprint<T> blueprint, Vector2 screenSpaceDelta)
|
2019-10-08 18:08:23 +08:00
|
|
|
{
|
|
|
|
Blueprint = blueprint;
|
2021-04-29 14:29:25 +08:00
|
|
|
ScreenSpaceDelta = screenSpaceDelta;
|
2019-10-08 18:08:23 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|