1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 13:07:24 +08:00

Don't snap to global grid while placing grid

This commit is contained in:
OliBomby 2024-09-23 17:24:09 +02:00
parent fe10621771
commit 0f0f490598
3 changed files with 5 additions and 1 deletions

View File

@ -70,6 +70,8 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints
return base.OnMouseDown(e);
}
public override SnapType SnapType => ~SnapType.GlobalGrids;
public override void UpdateTimeAndPosition(SnapResult result)
{
var pos = ToLocalSpace(result.ScreenSpacePosition);

View File

@ -71,6 +71,8 @@ namespace osu.Game.Rulesets.Edit
PlacementActive = PlacementState.Finished;
}
public virtual SnapType SnapType => SnapType.All;
/// <summary>
/// Updates the time and position of this <see cref="PlacementBlueprint"/> based on the provided snap information.
/// </summary>

View File

@ -297,7 +297,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
private void updatePlacementPosition()
{
var snapResult = Composer.FindSnappedPositionAndTime(InputManager.CurrentState.Mouse.Position);
var snapResult = Composer.FindSnappedPositionAndTime(InputManager.CurrentState.Mouse.Position, CurrentPlacement.SnapType);
// if no time was found from positional snapping, we should still quantize to the beat.
snapResult.Time ??= Beatmap.SnapTime(EditorClock.CurrentTime, null);