1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 14:17:26 +08:00

Only accept drag movement on the overlays

This commit is contained in:
smoogipoo 2018-03-12 17:33:10 +09:00
parent 212142429f
commit 8c4bcb4a04
2 changed files with 5 additions and 0 deletions

View File

@ -8,6 +8,7 @@ using osu.Game.Rulesets.Edit.Layers.Selection;
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Rulesets.Osu.Objects.Drawables;
using osu.Game.Rulesets.Osu.Objects.Drawables.Pieces;
using OpenTK;
using OpenTK.Graphics;
namespace osu.Game.Rulesets.Osu.Edit.Layers.Selection.Overlays
@ -56,5 +57,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Layers.Selection.Overlays
// Need to cause one update
body.UpdateProgress(0);
}
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => body.ReceiveMouseInputAt(screenSpacePos);
}
}

View File

@ -68,6 +68,8 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection
Position = topLeft;
}
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => overlays.Any(o => o.ReceiveMouseInputAt(screenSpacePos));
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true;
protected override bool OnDragStart(InputState state) => true;