mirror of
https://github.com/ppy/osu.git
synced 2024-11-15 15:17:44 +08:00
Don't snap to global grid while placing grid
This commit is contained in:
parent
fe10621771
commit
0f0f490598
@ -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);
|
||||
|
@ -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>
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user