From 423fe4eba85876df212c17648adb74b02e075d34 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Tue, 20 Feb 2018 14:25:42 +0900 Subject: [PATCH] Combine border radiuses of selection and capture boxes --- .../Edit/Layers/Selection/CaptureBox.cs | 2 +- .../Edit/Layers/Selection/SelectionBox.cs | 29 ++++++------------- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/osu.Game/Rulesets/Edit/Layers/Selection/CaptureBox.cs b/osu.Game/Rulesets/Edit/Layers/Selection/CaptureBox.cs index 48f6393ccc..269dd79bf7 100644 --- a/osu.Game/Rulesets/Edit/Layers/Selection/CaptureBox.cs +++ b/osu.Game/Rulesets/Edit/Layers/Selection/CaptureBox.cs @@ -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 { diff --git a/osu.Game/Rulesets/Edit/Layers/Selection/SelectionBox.cs b/osu.Game/Rulesets/Edit/Layers/Selection/SelectionBox.cs index 8eee15d0b2..1c25846ee3 100644 --- a/osu.Game/Rulesets/Edit/Layers/Selection/SelectionBox.cs +++ b/osu.Game/Rulesets/Edit/Layers/Selection/SelectionBox.cs @@ -14,32 +14,21 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection /// public class SelectionBox : VisibilityContainer { + public const float BORDER_RADIUS = 2; + /// /// Creates a new . /// 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 }; }