Merge pull request #2092 from smoogipoo/fix-selection-border-radius

Combine border radiuses of selection and capture boxes
This commit is contained in:
Dean Herbert 2018-02-20 16:00:07 +09:00 committed by GitHub
commit e1a6017df9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 21 deletions

View File

@ -26,7 +26,7 @@ public CaptureBox(IDrawable captureArea, IReadOnlyList<DrawableHitObject> captur
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
};
}