mirror of https://github.com/ppy/osu
Give HitObjectOverlayLayer full input state information
This commit is contained in:
parent
376f6eec58
commit
0e8fbc47b7
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue