mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 03:25:11 +08:00
Merge pull request #2092 from smoogipoo/fix-selection-border-radius
Combine border radiuses of selection and capture boxes
This commit is contained in:
commit
e1a6017df9
@ -26,7 +26,7 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection
|
|||||||
this.capturedObjects = capturedObjects;
|
this.capturedObjects = capturedObjects;
|
||||||
|
|
||||||
Masking = true;
|
Masking = true;
|
||||||
BorderThickness = 3;
|
BorderThickness = SelectionBox.BORDER_RADIUS;
|
||||||
|
|
||||||
InternalChild = new Box
|
InternalChild = new Box
|
||||||
{
|
{
|
||||||
|
@ -14,32 +14,21 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class SelectionBox : VisibilityContainer
|
public class SelectionBox : VisibilityContainer
|
||||||
{
|
{
|
||||||
|
public const float BORDER_RADIUS = 2;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a new <see cref="SelectionBox"/>.
|
/// Creates a new <see cref="SelectionBox"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public SelectionBox()
|
public SelectionBox()
|
||||||
{
|
{
|
||||||
InternalChildren = new Drawable[]
|
Masking = true;
|
||||||
|
BorderColour = Color4.White;
|
||||||
|
BorderThickness = BORDER_RADIUS;
|
||||||
|
|
||||||
|
Child = new Box
|
||||||
{
|
{
|
||||||
new Container
|
RelativeSizeAxes = Axes.Both,
|
||||||
{
|
Alpha = 0.1f
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Padding = new MarginPadding(-1),
|
|
||||||
Child = new Container
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Masking = true,
|
|
||||||
BorderColour = Color4.White,
|
|
||||||
BorderThickness = 2,
|
|
||||||
MaskingSmoothness = 1,
|
|
||||||
Child = new Box
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Alpha = 0.1f,
|
|
||||||
AlwaysPresent = true
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user