mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 19:22:54 +08:00
Merge pull request #11196 from Grrum/alignSelectionBoxCirclesToCenterOfBorder
Align selection box circles to center of border
This commit is contained in:
commit
28674cedd6
@ -92,6 +92,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
}
|
||||
}
|
||||
|
||||
private Container dragHandles;
|
||||
private FillFlowContainer buttons;
|
||||
|
||||
public const float BORDER_RADIUS = 3;
|
||||
@ -151,6 +152,12 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
},
|
||||
}
|
||||
},
|
||||
dragHandles = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
// ensures that the centres of all drag handles line up with the middle of the selection box border.
|
||||
Padding = new MarginPadding(BORDER_RADIUS / 2)
|
||||
},
|
||||
buttons = new FillFlowContainer
|
||||
{
|
||||
Y = 20,
|
||||
@ -232,7 +239,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
});
|
||||
}
|
||||
|
||||
private void addDragHandle(Anchor anchor) => AddInternal(new SelectionBoxDragHandle
|
||||
private void addDragHandle(Anchor anchor) => dragHandles.Add(new SelectionBoxDragHandle
|
||||
{
|
||||
Anchor = anchor,
|
||||
HandleDrag = e => OnScale?.Invoke(e.Delta, anchor),
|
||||
|
Loading…
Reference in New Issue
Block a user