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:
parent
52309465eb
commit
d1cbaa9612
@ -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);
|
||||
|
@ -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 };
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user