1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 06:23:21 +08:00

Combine border radiuses of selection and capture boxes

This commit is contained in:
smoogipoo 2018-02-20 14:25:42 +09:00
parent 63c8b11c2c
commit 423fe4eba8
2 changed files with 10 additions and 21 deletions

View File

@ -26,7 +26,7 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection
this.capturedObjects = capturedObjects;
Masking = true;
BorderThickness = 3;
BorderThickness = SelectionBox.BORDER_RADIUS;
InternalChild = new Box
{

View File

@ -14,32 +14,21 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection
/// </summary>
public class SelectionBox : VisibilityContainer
{
public const float BORDER_RADIUS = 2;
/// <summary>
/// Creates a new <see cref="SelectionBox"/>.
/// </summary>
public SelectionBox()
{
InternalChildren = new Drawable[]
Masking = true;
BorderColour = Color4.White;
BorderThickness = BORDER_RADIUS;
Child = new Box
{
new Container
{
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
},
}
}
RelativeSizeAxes = Axes.Both,
Alpha = 0.1f
};
}