mirror of
https://github.com/ppy/osu.git
synced 2025-01-07 22:16:10 +08:00
Only accept drag movement on the overlays
This commit is contained in:
parent
212142429f
commit
8c4bcb4a04
@ -8,6 +8,7 @@ using osu.Game.Rulesets.Edit.Layers.Selection;
|
|||||||
using osu.Game.Rulesets.Osu.Objects;
|
using osu.Game.Rulesets.Osu.Objects;
|
||||||
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
||||||
using osu.Game.Rulesets.Osu.Objects.Drawables.Pieces;
|
using osu.Game.Rulesets.Osu.Objects.Drawables.Pieces;
|
||||||
|
using OpenTK;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Edit.Layers.Selection.Overlays
|
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
|
// Need to cause one update
|
||||||
body.UpdateProgress(0);
|
body.UpdateProgress(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => body.ReceiveMouseInputAt(screenSpacePos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -68,6 +68,8 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection
|
|||||||
Position = topLeft;
|
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 OnMouseDown(InputState state, MouseDownEventArgs args) => true;
|
||||||
|
|
||||||
protected override bool OnDragStart(InputState state) => true;
|
protected override bool OnDragStart(InputState state) => true;
|
||||||
|
Loading…
Reference in New Issue
Block a user