mirror of
https://github.com/ppy/osu.git
synced 2025-02-14 00:13:10 +08:00
Give HitObjectOverlayLayer full input state information
This commit is contained in:
parent
376f6eec58
commit
0e8fbc47b7
@ -22,7 +22,7 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection
|
||||
/// <summary>
|
||||
/// Invoked when the captured <see cref="DrawableHitObject"/>s should be moved.
|
||||
/// </summary>
|
||||
public event Action<Vector2> MovementRequested;
|
||||
public event Action<InputState> MovementRequested;
|
||||
|
||||
private readonly IDrawable captureArea;
|
||||
private readonly IReadOnlyList<DrawableHitObject> capturedObjects;
|
||||
@ -80,7 +80,7 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection
|
||||
|
||||
protected override bool OnDrag(InputState state)
|
||||
{
|
||||
MovementRequested?.Invoke(state.Mouse.Delta);
|
||||
MovementRequested?.Invoke(state);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,6 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Input;
|
||||
using osu.Game.Rulesets.Edit.Types;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using OpenTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Edit.Layers.Selection
|
||||
{
|
||||
@ -49,7 +48,7 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection
|
||||
existing.Expire();
|
||||
}
|
||||
|
||||
public void MoveObjects(Vector2 offset)
|
||||
public void MoveObjects(InputState state)
|
||||
{
|
||||
// Todo: Various forms of snapping
|
||||
foreach (var hitObject in overlayContainer.Select(o => o.HitObject.HitObject))
|
||||
|
@ -30,7 +30,7 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection
|
||||
/// <summary>
|
||||
/// Invoked when the selected <see cref="DrawableHitObject"/>s should be moved.
|
||||
/// </summary>
|
||||
public event Action<Vector2> SelectionMovementRequested;
|
||||
public event Action<InputState> SelectionMovementRequested;
|
||||
|
||||
private readonly Playfield playfield;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user