mirror of https://github.com/ppy/osu
Don't snap to global grid while placing grid
This commit is contained in:
parent
fe10621771
commit
0f0f490598
|
@ -70,6 +70,8 @@ protected override bool OnMouseDown(MouseDownEvent e)
|
|||
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 @@ public virtual void EndPlacement(bool commit)
|
|||
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 @@ private void refreshTool()
|
|||
|
||||
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