mirror of
https://github.com/ppy/osu.git
synced 2025-01-21 06:02:56 +08:00
Fix formatting issues
This commit is contained in:
parent
788033e1b8
commit
ecb4727aec
@ -26,7 +26,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
|
|||||||
/// Offset in absolute (local) coordinates from the end of the curve.
|
/// Offset in absolute (local) coordinates from the end of the curve.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Vector2 PathEndLocation => body.PathEndOffset;
|
public Vector2 PathEndLocation => body.PathEndOffset;
|
||||||
|
|
||||||
public SliderBodyPiece()
|
public SliderBodyPiece()
|
||||||
{
|
{
|
||||||
InternalChild = body = new ManualSliderBody
|
InternalChild = body = new ManualSliderBody
|
||||||
|
@ -410,7 +410,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
|
|||||||
?? BodyPiece.ToScreenSpace(BodyPiece.PathStartLocation);
|
?? BodyPiece.ToScreenSpace(BodyPiece.PathStartLocation);
|
||||||
|
|
||||||
public override Vector2 ScreenSpaceEndPoint => DrawableObject.SliderBody?.ToScreenSpace(DrawableObject.SliderBody.PathEndOffset)
|
public override Vector2 ScreenSpaceEndPoint => DrawableObject.SliderBody?.ToScreenSpace(DrawableObject.SliderBody.PathEndOffset)
|
||||||
?? BodyPiece.ToScreenSpace(BodyPiece.PathEndLocation);
|
?? BodyPiece.ToScreenSpace(BodyPiece.PathEndLocation);
|
||||||
|
|
||||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) =>
|
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) =>
|
||||||
BodyPiece.ReceivePositionalInputAt(screenSpacePos) || ControlPointVisualiser?.Pieces.Any(p => p.ReceivePositionalInputAt(screenSpacePos)) == true;
|
BodyPiece.ReceivePositionalInputAt(screenSpacePos) || ControlPointVisualiser?.Pieces.Any(p => p.ReceivePositionalInputAt(screenSpacePos)) == true;
|
||||||
|
@ -462,8 +462,8 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
movementBlueprints = SortForMovement(SelectionHandler.SelectedBlueprints).ToArray();
|
movementBlueprints = SortForMovement(SelectionHandler.SelectedBlueprints).ToArray();
|
||||||
movementBlueprintOriginalPositions = movementBlueprints.Select(m => m.ScreenSpaceSelectionPoint).ToArray();
|
movementBlueprintOriginalPositions = movementBlueprints.Select(m => m.ScreenSpaceSelectionPoint).ToArray();
|
||||||
movementBlueprintOriginalEndPositions = movementBlueprints.Where(m => m.ScreenSpaceSelectionPoint != m.ScreenSpaceEndPoint)
|
movementBlueprintOriginalEndPositions = movementBlueprints.Where(m => m.ScreenSpaceSelectionPoint != m.ScreenSpaceEndPoint)
|
||||||
.Select(m => m.ScreenSpaceEndPoint).ToArray();
|
.Select(m => m.ScreenSpaceEndPoint).ToArray();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -491,12 +491,14 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
if (snapProvider != null)
|
if (snapProvider != null)
|
||||||
{
|
{
|
||||||
var currentSelectionPointPositions = movementBlueprints.Select(m => m.ScreenSpaceSelectionPoint).ToArray();
|
var currentSelectionPointPositions = movementBlueprints.Select(m => m.ScreenSpaceSelectionPoint).ToArray();
|
||||||
|
|
||||||
if (checkSnappingForNearbyObjects(distanceTraveled, movementBlueprintOriginalPositions, currentSelectionPointPositions))
|
if (checkSnappingForNearbyObjects(distanceTraveled, movementBlueprintOriginalPositions, currentSelectionPointPositions))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
var currentEndPointPositions = movementBlueprints.Where(m => m.ScreenSpaceSelectionPoint != m.ScreenSpaceEndPoint)
|
var currentEndPointPositions = movementBlueprints.Where(m => m.ScreenSpaceSelectionPoint != m.ScreenSpaceEndPoint)
|
||||||
.Select(m => m.ScreenSpaceEndPoint)
|
.Select(m => m.ScreenSpaceEndPoint)
|
||||||
.ToArray();
|
.ToArray();
|
||||||
|
|
||||||
if (checkSnappingForNearbyObjects(distanceTraveled, movementBlueprintOriginalEndPositions, currentEndPointPositions))
|
if (checkSnappingForNearbyObjects(distanceTraveled, movementBlueprintOriginalEndPositions, currentEndPointPositions))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -542,6 +544,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
if (SelectionHandler.HandleMovement(new MoveSelectionEvent<T>(movementBlueprints[i], delta)))
|
if (SelectionHandler.HandleMovement(new MoveSelectionEvent<T>(movementBlueprints[i], delta)))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user