1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-07 14:27:25 +08:00
osu-lazer/osu.Game/Screens/Edit/Compose/Components/SelectionBoxDragHandle.cs
Salman Ahmed b252485e1a Remove protected expose of HandlingMouse setter
Regardless of `OnDragEnd()`, `OnMouseUp()` will still be called resetting the value of that state back.
2021-04-25 20:13:23 +03:00

34 lines
848 B
C#

// 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 System;
using osu.Framework.Input.Events;
namespace osu.Game.Screens.Edit.Compose.Components
{
public abstract class SelectionBoxDragHandle : SelectionBoxControl
{
public Action<DragEvent> HandleDrag { get; set; }
protected override bool OnDragStart(DragStartEvent e)
{
OnOperationStarted();
return true;
}
protected override void OnDrag(DragEvent e)
{
HandleDrag?.Invoke(e);
base.OnDrag(e);
}
protected override void OnDragEnd(DragEndEvent e)
{
OnOperationEnded();
UpdateHoverState();
base.OnDragEnd(e);
}
}
}