From 11c18952e3138c7bd2f85a8a9336e55c888f6c38 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 5 Nov 2020 18:03:24 +0900 Subject: [PATCH] Allow children to be added in base class --- osu.Game.Rulesets.Osu/Skinning/LegacyNewStyleSpinner.cs | 4 ++-- osu.Game.Rulesets.Osu/Skinning/LegacyOldStyleSpinner.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Skinning/LegacyNewStyleSpinner.cs b/osu.Game.Rulesets.Osu/Skinning/LegacyNewStyleSpinner.cs index 5b6aac8f08..f77a722376 100644 --- a/osu.Game.Rulesets.Osu/Skinning/LegacyNewStyleSpinner.cs +++ b/osu.Game.Rulesets.Osu/Skinning/LegacyNewStyleSpinner.cs @@ -35,7 +35,7 @@ namespace osu.Game.Rulesets.Osu.Skinning { Scale = new Vector2(final_scale); - InternalChildren = new Drawable[] + AddRangeInternal(new Drawable[] { glow = new Sprite { @@ -69,7 +69,7 @@ namespace osu.Game.Rulesets.Osu.Skinning Origin = Anchor.Centre, Texture = source.GetTexture("spinner-middle2") } - }; + }); } protected override void UpdateStateTransforms(DrawableHitObject drawableHitObject, ArmedState state) diff --git a/osu.Game.Rulesets.Osu/Skinning/LegacyOldStyleSpinner.cs b/osu.Game.Rulesets.Osu/Skinning/LegacyOldStyleSpinner.cs index 56702e6712..dd63879247 100644 --- a/osu.Game.Rulesets.Osu/Skinning/LegacyOldStyleSpinner.cs +++ b/osu.Game.Rulesets.Osu/Skinning/LegacyOldStyleSpinner.cs @@ -34,7 +34,7 @@ namespace osu.Game.Rulesets.Osu.Skinning { spinnerBlink = source.GetConfig(OsuSkinConfiguration.SpinnerNoBlink)?.Value != true; - InternalChild = new Container + AddInternal(new Container { // the old-style spinner relied heavily on absolute screen-space coordinate values. // wrap everything in a container simulating absolute coords to preserve alignment @@ -77,7 +77,7 @@ namespace osu.Game.Rulesets.Osu.Skinning } } } - }; + }); } protected override void UpdateStateTransforms(DrawableHitObject drawableHitObject, ArmedState state)