1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Use the column width

This commit is contained in:
smoogipoo 2018-11-19 18:02:01 +09:00
parent 52309465eb
commit d1cbaa9612
2 changed files with 3 additions and 1 deletions

View File

@ -37,10 +37,13 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints
protected override bool OnMouseMove(MouseMoveEvent e)
{
Column column = ColumnAt(e.ScreenSpaceMousePosition);
if (column == null)
SnappedMousePosition = e.MousePosition;
else
{
Width = column.DrawWidth;
// Snap to the column
var parentPos = Parent.ToLocalSpace(column.ToScreenSpace(new Vector2(column.DrawWidth / 2, 0)));
SnappedMousePosition = new Vector2(parentPos.X, e.MousePosition.Y);

View File

@ -17,7 +17,6 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints
Origin = Anchor.Centre;
AutoSizeAxes = Axes.Y;
Width = 45;
InternalChild = new EditNotePiece { RelativeSizeAxes = Axes.X };
}