diff --git a/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/NestedOutlineContainer.cs b/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/NestedOutlineContainer.cs index 9e1743de98..48d90e8b24 100644 --- a/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/NestedOutlineContainer.cs +++ b/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/NestedOutlineContainer.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Linq; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Primitives; using osu.Game.Rulesets.Catch.Objects; using osu.Game.Rulesets.UI.Scrolling; @@ -12,15 +13,11 @@ namespace osu.Game.Rulesets.Catch.Edit.Blueprints.Components { public class NestedOutlineContainer : CompositeDrawable { - private readonly Container nestedOutlines; - private readonly List nestedHitObjects = new List(); public NestedOutlineContainer() { Anchor = Anchor.BottomLeft; - - InternalChild = nestedOutlines = new Container(); } public void UpdatePositionFrom(ScrollingHitObjectContainer hitObjectContainer, CatchHitObject parentHitObject) @@ -36,18 +33,21 @@ namespace osu.Game.Rulesets.Catch.Edit.Blueprints.Components .OfType() .Where(h => !(h is TinyDroplet))); - while (nestedHitObjects.Count < nestedOutlines.Count) - nestedOutlines.Remove(nestedOutlines[^1]); + while (nestedHitObjects.Count < InternalChildren.Count) + RemoveInternal(InternalChildren[^1]); - while (nestedOutlines.Count < nestedHitObjects.Count) - nestedOutlines.Add(new FruitOutline()); + while (InternalChildren.Count < nestedHitObjects.Count) + AddInternal(new FruitOutline()); for (int i = 0; i < nestedHitObjects.Count; i++) { var hitObject = nestedHitObjects[i]; - nestedOutlines[i].UpdateFrom(hitObjectContainer, hitObject, parentHitObject); - nestedOutlines[i].Scale *= hitObject is Droplet ? 0.5f : 1; + var outline = (FruitOutline)InternalChildren[i]; + outline.UpdateFrom(hitObjectContainer, hitObject, parentHitObject); + outline.Scale *= hitObject is Droplet ? 0.5f : 1; } } + + protected override bool ComputeIsMaskedAway(RectangleF maskingBounds) => false; } } diff --git a/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/ScrollingPath.cs b/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/ScrollingPath.cs index 337b8de92e..96111beda4 100644 --- a/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/ScrollingPath.cs +++ b/osu.Game.Rulesets.Catch/Edit/Blueprints/Components/ScrollingPath.cs @@ -6,6 +6,7 @@ using System.Linq; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Lines; +using osu.Framework.Graphics.Primitives; using osu.Game.Rulesets.Catch.Objects; using osu.Game.Rulesets.UI.Scrolling; using osuTK; @@ -75,5 +76,8 @@ namespace osu.Game.Rulesets.Catch.Edit.Blueprints.Components sliderVertices.Reverse(); } } + + // Because this has 0x0 size, the contents are otherwise masked away if the start position is outside the screen. + protected override bool ComputeIsMaskedAway(RectangleF maskingBounds) => false; } }