Fix drag breaking if scrolling while dragging

This commit is contained in:
smoogipoo
2018-11-26 16:08:56 +09:00
parent 60ffad169f
commit f9f300b215
6 changed files with 69 additions and 13 deletions

View File

@ -180,7 +180,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
private void onSelectionRequested(SelectionBlueprint blueprint, InputState state) => selectionHandler.HandleSelectionRequested(blueprint, state);
private void onDragRequested(DragEvent dragEvent) => selectionHandler.HandleDrag(dragEvent);
private void onDragRequested(SelectionBlueprint blueprint, DragEvent dragEvent) => selectionHandler.HandleDrag(blueprint, dragEvent);
private class SelectionBlueprintContainer : Container<SelectionBlueprint>
{

View File

@ -13,6 +13,7 @@ using osu.Framework.Input.States;
using osu.Game.Graphics;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Drawables;
using osuTK;
using osuTK.Input;
@ -66,8 +67,9 @@ namespace osu.Game.Screens.Edit.Compose.Components
/// <summary>
/// Handles the selected <see cref="DrawableHitObject"/>s being dragged.
/// </summary>
/// <param name="blueprint">The <see cref="SelectionBlueprint"/> that received the drag event.</param>
/// <param name="dragEvent">The drag event.</param>
public virtual void HandleDrag(DragEvent dragEvent)
public virtual void HandleDrag(SelectionBlueprint blueprint, DragEvent dragEvent)
{
}