Give HitObjectOverlayLayer full input state information

This commit is contained in:
smoogipoo 2018-03-10 00:02:51 +09:00
parent 376f6eec58
commit 0e8fbc47b7
3 changed files with 4 additions and 5 deletions

View File

@ -22,7 +22,7 @@ public class CaptureBox : VisibilityContainer
/// <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 @@ protected override void Update()
protected override bool OnDrag(InputState state)
{
MovementRequested?.Invoke(state.Mouse.Delta);
MovementRequested?.Invoke(state);
return true;
}

View File

@ -7,7 +7,6 @@
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 @@ public void RemoveOverlay(DrawableHitObject hitObject)
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))

View File

@ -30,7 +30,7 @@ public class SelectionLayer : CompositeDrawable
/// <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;