1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 01:27:29 +08:00

Remove nested container

This commit is contained in:
smoogipoo 2018-02-12 19:00:44 +09:00
parent c3212d36ef
commit bfedd1cee0

View File

@ -20,26 +20,20 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection
private readonly IDrawable captureArea;
private readonly IReadOnlyList<DrawableHitObject> capturedObjects;
private readonly Container borderContainer;
public CaptureBox(IDrawable captureArea, IReadOnlyList<DrawableHitObject> capturedObjects)
{
this.captureArea = captureArea;
this.capturedObjects = capturedObjects;
Origin = Anchor.Centre;
Masking = true;
BorderThickness = 3;
InternalChild = borderContainer = new Container
InternalChild = new Box
{
RelativeSizeAxes = Axes.Both,
Masking = true,
BorderThickness = 3,
Child = new Box
{
RelativeSizeAxes = Axes.Both,
AlwaysPresent = true,
Alpha = 0
}
AlwaysPresent = true,
Alpha = 0
};
State = Visibility.Visible;
@ -48,7 +42,7 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
borderContainer.BorderColour = colours.Yellow;
BorderColour = colours.Yellow;
// Move the rectangle to cover the hitobjects
var topLeft = new Vector2(float.MaxValue, float.MaxValue);