mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 16:02:55 +08:00
Remove old, now unnecessary method
This commit is contained in:
parent
7f5a1d7f44
commit
acf95fca9c
@ -35,35 +35,12 @@ namespace osu.Game.Rulesets.Mania.Edit
|
|||||||
var maniaBlueprint = (ManiaSelectionBlueprint)moveEvent.Blueprint;
|
var maniaBlueprint = (ManiaSelectionBlueprint)moveEvent.Blueprint;
|
||||||
int lastColumn = maniaBlueprint.DrawableObject.HitObject.Column;
|
int lastColumn = maniaBlueprint.DrawableObject.HitObject.Column;
|
||||||
|
|
||||||
// adjustOrigins(maniaBlueprint);
|
|
||||||
performDragMovement(moveEvent);
|
performDragMovement(moveEvent);
|
||||||
performColumnMovement(lastColumn, moveEvent);
|
performColumnMovement(lastColumn, moveEvent);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Ensures that the position of hitobjects remains centred to the mouse position.
|
|
||||||
/// E.g. The hitobject position will change if the editor scrolls while a hitobject is dragged.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="reference">The <see cref="ManiaSelectionBlueprint"/> that received the drag event.</param>
|
|
||||||
private void adjustOrigins(ManiaSelectionBlueprint reference)
|
|
||||||
{
|
|
||||||
var referenceParent = (HitObjectContainer)reference.DrawableObject.Parent;
|
|
||||||
|
|
||||||
float offsetFromReferenceOrigin = reference.DragPosition.Y - reference.DrawableObject.OriginPosition.Y;
|
|
||||||
float targetPosition = referenceParent.ToLocalSpace(reference.ScreenSpaceDragPosition).Y - offsetFromReferenceOrigin;
|
|
||||||
|
|
||||||
// Flip the vertical coordinate space when scrolling downwards
|
|
||||||
if (scrollingInfo.Direction.Value == ScrollingDirection.Down)
|
|
||||||
targetPosition -= referenceParent.DrawHeight;
|
|
||||||
|
|
||||||
float movementDelta = targetPosition - reference.DrawableObject.Position.Y;
|
|
||||||
|
|
||||||
foreach (var b in SelectedBlueprints.OfType<ManiaSelectionBlueprint>())
|
|
||||||
b.DrawableObject.Y += movementDelta;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void performDragMovement(MoveSelectionEvent moveEvent)
|
private void performDragMovement(MoveSelectionEvent moveEvent)
|
||||||
{
|
{
|
||||||
float delta = moveEvent.InstantDelta.Y;
|
float delta = moveEvent.InstantDelta.Y;
|
||||||
|
Loading…
Reference in New Issue
Block a user