From 0e8fbc47b7610a8fc2f69e2a3aa47372c63d9b1f Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Sat, 10 Mar 2018 00:02:51 +0900 Subject: [PATCH] Give HitObjectOverlayLayer full input state information --- osu.Game/Rulesets/Edit/Layers/Selection/CaptureBox.cs | 4 ++-- .../Rulesets/Edit/Layers/Selection/HitObjectOverlayLayer.cs | 3 +-- osu.Game/Rulesets/Edit/Layers/Selection/SelectionLayer.cs | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/osu.Game/Rulesets/Edit/Layers/Selection/CaptureBox.cs b/osu.Game/Rulesets/Edit/Layers/Selection/CaptureBox.cs index 1454c78014..970481032b 100644 --- a/osu.Game/Rulesets/Edit/Layers/Selection/CaptureBox.cs +++ b/osu.Game/Rulesets/Edit/Layers/Selection/CaptureBox.cs @@ -22,7 +22,7 @@ public class CaptureBox : VisibilityContainer /// /// Invoked when the captured s should be moved. /// - public event Action MovementRequested; + public event Action MovementRequested; private readonly IDrawable captureArea; private readonly IReadOnlyList 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; } diff --git a/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlayLayer.cs b/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlayLayer.cs index d391855f7a..438ba5e76d 100644 --- a/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlayLayer.cs +++ b/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlayLayer.cs @@ -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)) diff --git a/osu.Game/Rulesets/Edit/Layers/Selection/SelectionLayer.cs b/osu.Game/Rulesets/Edit/Layers/Selection/SelectionLayer.cs index 0383b933ab..ca6c1c122a 100644 --- a/osu.Game/Rulesets/Edit/Layers/Selection/SelectionLayer.cs +++ b/osu.Game/Rulesets/Edit/Layers/Selection/SelectionLayer.cs @@ -30,7 +30,7 @@ public class SelectionLayer : CompositeDrawable /// /// Invoked when the selected s should be moved. /// - public event Action SelectionMovementRequested; + public event Action SelectionMovementRequested; private readonly Playfield playfield;