1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 22:22:54 +08:00

Fix formatting issues

This commit is contained in:
Dean Herbert 2023-01-18 17:33:14 +09:00
parent 788033e1b8
commit ecb4727aec
3 changed files with 9 additions and 6 deletions

View File

@ -26,7 +26,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
/// Offset in absolute (local) coordinates from the end of the curve.
/// </summary>
public Vector2 PathEndLocation => body.PathEndOffset;
public SliderBodyPiece()
{
InternalChild = body = new ManualSliderBody

View File

@ -410,7 +410,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
?? BodyPiece.ToScreenSpace(BodyPiece.PathStartLocation);
public override Vector2 ScreenSpaceEndPoint => DrawableObject.SliderBody?.ToScreenSpace(DrawableObject.SliderBody.PathEndOffset)
?? BodyPiece.ToScreenSpace(BodyPiece.PathEndLocation);
?? BodyPiece.ToScreenSpace(BodyPiece.PathEndLocation);
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) =>
BodyPiece.ReceivePositionalInputAt(screenSpacePos) || ControlPointVisualiser?.Pieces.Any(p => p.ReceivePositionalInputAt(screenSpacePos)) == true;

View File

@ -462,8 +462,8 @@ namespace osu.Game.Screens.Edit.Compose.Components
movementBlueprints = SortForMovement(SelectionHandler.SelectedBlueprints).ToArray();
movementBlueprintOriginalPositions = movementBlueprints.Select(m => m.ScreenSpaceSelectionPoint).ToArray();
movementBlueprintOriginalEndPositions = movementBlueprints.Where(m => m.ScreenSpaceSelectionPoint != m.ScreenSpaceEndPoint)
.Select(m => m.ScreenSpaceEndPoint).ToArray();
.Select(m => m.ScreenSpaceEndPoint).ToArray();
return true;
}
@ -491,12 +491,14 @@ namespace osu.Game.Screens.Edit.Compose.Components
if (snapProvider != null)
{
var currentSelectionPointPositions = movementBlueprints.Select(m => m.ScreenSpaceSelectionPoint).ToArray();
if (checkSnappingForNearbyObjects(distanceTraveled, movementBlueprintOriginalPositions, currentSelectionPointPositions))
return true;
var currentEndPointPositions = movementBlueprints.Where(m => m.ScreenSpaceSelectionPoint != m.ScreenSpaceEndPoint)
.Select(m => m.ScreenSpaceEndPoint)
.ToArray();
.Select(m => m.ScreenSpaceEndPoint)
.ToArray();
if (checkSnappingForNearbyObjects(distanceTraveled, movementBlueprintOriginalEndPositions, currentEndPointPositions))
return true;
}
@ -542,6 +544,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
if (SelectionHandler.HandleMovement(new MoveSelectionEvent<T>(movementBlueprints[i], delta)))
return true;
}
return false;
}