2021-04-24 12:44:33 +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.
|
|
|
|
|
2022-06-17 15:37:17 +08:00
|
|
|
#nullable disable
|
|
|
|
|
2022-01-09 00:19:52 +08:00
|
|
|
using System;
|
2021-04-24 12:44:33 +08:00
|
|
|
using osu.Framework.Allocation;
|
2022-01-09 00:19:52 +08:00
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Framework.Input.Events;
|
2021-04-24 12:44:33 +08:00
|
|
|
using osuTK;
|
|
|
|
|
|
|
|
namespace osu.Game.Screens.Edit.Compose.Components
|
|
|
|
{
|
|
|
|
public partial class SelectionBoxScaleHandle : SelectionBoxDragHandle
|
|
|
|
{
|
2022-01-09 00:19:52 +08:00
|
|
|
public Action<Vector2, Anchor> HandleScale { get; set; }
|
|
|
|
|
2021-04-24 12:44:33 +08:00
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load()
|
|
|
|
{
|
|
|
|
Size = new Vector2(10);
|
|
|
|
}
|
2022-01-09 00:19:52 +08:00
|
|
|
|
|
|
|
protected override void OnDrag(DragEvent e)
|
|
|
|
{
|
|
|
|
HandleScale?.Invoke(e.Delta, Anchor);
|
|
|
|
base.OnDrag(e);
|
|
|
|
}
|
2021-04-24 12:44:33 +08:00
|
|
|
}
|
|
|
|
}
|