mirror of
https://github.com/osukey/osukey.git
synced 2025-06-05 12:57:39 +09: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)
|
protected override bool OnMouseMove(MouseMoveEvent e)
|
||||||
{
|
{
|
||||||
Column column = ColumnAt(e.ScreenSpaceMousePosition);
|
Column column = ColumnAt(e.ScreenSpaceMousePosition);
|
||||||
|
|
||||||
if (column == null)
|
if (column == null)
|
||||||
SnappedMousePosition = e.MousePosition;
|
SnappedMousePosition = e.MousePosition;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Width = column.DrawWidth;
|
||||||
|
|
||||||
// Snap to the column
|
// Snap to the column
|
||||||
var parentPos = Parent.ToLocalSpace(column.ToScreenSpace(new Vector2(column.DrawWidth / 2, 0)));
|
var parentPos = Parent.ToLocalSpace(column.ToScreenSpace(new Vector2(column.DrawWidth / 2, 0)));
|
||||||
SnappedMousePosition = new Vector2(parentPos.X, e.MousePosition.Y);
|
SnappedMousePosition = new Vector2(parentPos.X, e.MousePosition.Y);
|
||||||
|
@ -17,7 +17,6 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints
|
|||||||
Origin = Anchor.Centre;
|
Origin = Anchor.Centre;
|
||||||
|
|
||||||
AutoSizeAxes = Axes.Y;
|
AutoSizeAxes = Axes.Y;
|
||||||
Width = 45;
|
|
||||||
|
|
||||||
InternalChild = new EditNotePiece { RelativeSizeAxes = Axes.X };
|
InternalChild = new EditNotePiece { RelativeSizeAxes = Axes.X };
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user