diff --git a/osu.Game.Rulesets.Mania/Edit/Blueprints/ManiaPlacementBlueprint.cs b/osu.Game.Rulesets.Mania/Edit/Blueprints/ManiaPlacementBlueprint.cs index a4675f71b3..7d9bbc064b 100644 --- a/osu.Game.Rulesets.Mania/Edit/Blueprints/ManiaPlacementBlueprint.cs +++ b/osu.Game.Rulesets.Mania/Edit/Blueprints/ManiaPlacementBlueprint.cs @@ -6,6 +6,7 @@ using osu.Framework.Graphics; using osu.Framework.Input.Events; using osu.Game.Rulesets.Edit; using osu.Game.Rulesets.Mania.Objects; +using osu.Game.Rulesets.Mania.Objects.Drawables.Pieces; using osu.Game.Rulesets.Mania.UI; using osu.Game.Rulesets.UI.Scrolling; using OpenTK; @@ -22,6 +23,11 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints /// protected Vector2 SnappedMousePosition { get; private set; } + /// + /// The width of the closest column to the current mouse position. + /// + protected float SnappedWidth { get; private set; } + [Resolved] private IManiaHitObjectComposer composer { get; set; } @@ -42,7 +48,7 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints SnappedMousePosition = e.MousePosition; else { - Width = column.DrawWidth; + SnappedWidth = column.DrawWidth; // Snap to the column var parentPos = Parent.ToLocalSpace(column.ToScreenSpace(new Vector2(column.DrawWidth / 2, 0))); @@ -80,10 +86,10 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints switch (scrollingInfo.Direction.Value) { case ScrollingDirection.Up: - position.Y -= DrawHeight / 2; + position.Y -= NotePiece.NOTE_HEIGHT / 2; break; case ScrollingDirection.Down: - position.Y += DrawHeight / 2; + position.Y += NotePiece.NOTE_HEIGHT / 2; break; } diff --git a/osu.Game.Rulesets.Mania/Edit/Blueprints/NotePlacementBlueprint.cs b/osu.Game.Rulesets.Mania/Edit/Blueprints/NotePlacementBlueprint.cs index 8114ee914f..26279de0d5 100644 --- a/osu.Game.Rulesets.Mania/Edit/Blueprints/NotePlacementBlueprint.cs +++ b/osu.Game.Rulesets.Mania/Edit/Blueprints/NotePlacementBlueprint.cs @@ -25,6 +25,7 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints { base.Update(); + Width = SnappedWidth; Position = SnappedMousePosition; }