Merge pull request #10138 from peppy/editor-fix-masking

Fix editor hitobjects getting masked weirdly
This commit is contained in:
Dan Balasescu 2020-09-11 20:57:53 +09:00 committed by GitHub
commit 53fab11321
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,17 +82,34 @@ namespace osu.Game.Rulesets.Edit
return; return;
} }
InternalChild = new GridContainer const float toolbar_width = 200;
InternalChildren = new Drawable[]
{ {
new Container
{
Name = "Content",
Padding = new MarginPadding { Left = toolbar_width },
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Content = new[] Children = new Drawable[]
{ {
new Drawable[] // layers below playfield
drawableRulesetWrapper.CreatePlayfieldAdjustmentContainer().WithChildren(new Drawable[]
{ {
LayerBelowRuleset,
new EditorPlayfieldBorder { RelativeSizeAxes = Axes.Both }
}),
drawableRulesetWrapper,
// layers above playfield
drawableRulesetWrapper.CreatePlayfieldAdjustmentContainer()
.WithChild(BlueprintContainer = CreateBlueprintContainer(HitObjects))
}
},
new FillFlowContainer new FillFlowContainer
{ {
Name = "Sidebar", Name = "Sidebar",
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Y,
Width = toolbar_width,
Padding = new MarginPadding { Right = 10 }, Padding = new MarginPadding { Right = 10 },
Spacing = new Vector2(10), Spacing = new Vector2(10),
Children = new Drawable[] Children = new Drawable[]
@ -108,31 +125,6 @@ namespace osu.Game.Rulesets.Edit
} }
} }
}, },
new Container
{
Name = "Content",
RelativeSizeAxes = Axes.Both,
Masking = true,
Children = new Drawable[]
{
// layers below playfield
drawableRulesetWrapper.CreatePlayfieldAdjustmentContainer().WithChildren(new Drawable[]
{
LayerBelowRuleset,
new EditorPlayfieldBorder { RelativeSizeAxes = Axes.Both }
}),
drawableRulesetWrapper,
// layers above playfield
drawableRulesetWrapper.CreatePlayfieldAdjustmentContainer()
.WithChild(BlueprintContainer = CreateBlueprintContainer(HitObjects))
}
}
},
},
ColumnDimensions = new[]
{
new Dimension(GridSizeMode.Absolute, 200),
}
}; };
toolboxCollection.Items = CompositionTools toolboxCollection.Items = CompositionTools