mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 14:03:21 +08:00
Remove nested container
This commit is contained in:
parent
c3212d36ef
commit
bfedd1cee0
@ -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
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Masking = true,
|
||||
BorderThickness = 3,
|
||||
Child = new Box
|
||||
InternalChild = new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user