1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 18:07:23 +08:00

Update usages of RemoveInternal

This commit is contained in:
Dean Herbert 2022-08-29 15:49:28 +09:00
parent a215d009fe
commit 105aa01e7d
10 changed files with 10 additions and 11 deletions

View File

@ -56,7 +56,7 @@ namespace osu.Game.Rulesets.Catch.Edit.Blueprints.Components
public void UpdateFrom(ScrollingHitObjectContainer hitObjectContainer, JuiceStream hitObject)
{
while (path.Vertices.Count < InternalChildren.Count)
RemoveInternal(InternalChildren[^1]);
RemoveInternal(InternalChildren[^1], true);
while (InternalChildren.Count < path.Vertices.Count)
AddInternal(new VertexPiece());

View File

@ -30,7 +30,7 @@ namespace osu.Game.Rulesets.Catch.Edit.Blueprints.Components
.Where(h => !(h is TinyDroplet)));
while (nestedHitObjects.Count < InternalChildren.Count)
RemoveInternal(InternalChildren[^1]);
RemoveInternal(InternalChildren[^1], true);
while (InternalChildren.Count < nestedHitObjects.Count)
AddInternal(new FruitOutline());

View File

@ -77,7 +77,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
// This is a bit ugly but we don't have the concept of InternalContent so it'll have to do for now. (https://github.com/ppy/osu-framework/issues/1690)
protected override void AddInternal(Drawable drawable) => shakeContainer.Add(drawable);
protected override void ClearInternal(bool disposeChildren = true) => shakeContainer.Clear(disposeChildren);
protected override bool RemoveInternal(Drawable drawable) => shakeContainer.Remove(drawable, true);
protected override bool RemoveInternal(Drawable drawable, bool disposeImmediately) => shakeContainer.Remove(drawable, disposeImmediately);
protected sealed override double InitialLifetimeOffset => HitObject.TimePreempt;

View File

@ -57,7 +57,7 @@ namespace osu.Game.Graphics.Backgrounds
{
if (bufferedContainer == null && newBlurSigma != Vector2.Zero)
{
RemoveInternal(Sprite);
RemoveInternal(Sprite, false);
AddInternal(bufferedContainer = new BufferedContainer(cachedFrameBuffer: true)
{

View File

@ -35,7 +35,7 @@ namespace osu.Game.Graphics.Containers
if (value == expandableHeader) return;
if (expandableHeader != null)
RemoveInternal(expandableHeader);
RemoveInternal(expandableHeader, false);
expandableHeader = value;

View File

@ -165,7 +165,7 @@ namespace osu.Game.Rulesets.Judgements
// sub-classes might have added their own children that would be removed here if .InternalChild was used.
if (JudgementBody != null)
RemoveInternal(JudgementBody);
RemoveInternal(JudgementBody, true);
AddInternal(JudgementBody = new SkinnableDrawable(new GameplaySkinComponent<HitResult>(type), _ =>
CreateDefaultJudgement(type), confineMode: ConfineMode.NoScaling)

View File

@ -132,7 +132,7 @@ namespace osu.Game.Rulesets.Objects.Pooling
/// <remarks>
/// Invoked when the entry became dead.
/// </remarks>
protected virtual void RemoveDrawable(TEntry entry, TDrawable drawable) => RemoveInternal(drawable);
protected virtual void RemoveDrawable(TEntry entry, TDrawable drawable) => RemoveInternal(drawable, false);
private void entryCrossedBoundary(LifetimeEntry lifetimeEntry, LifetimeBoundaryKind kind, LifetimeBoundaryCrossingDirection direction)
{

View File

@ -124,7 +124,7 @@ namespace osu.Game.Rulesets.UI
unbindStartTime(drawable);
RemoveInternal(drawable);
RemoveInternal(drawable, false);
}
#endregion

View File

@ -166,8 +166,7 @@ namespace osu.Game.Screens.Play
if (filters.Parent == null)
return;
RemoveInternal(filters);
filters.Dispose();
RemoveInternal(filters, true);
}
protected override void Update()

View File

@ -34,7 +34,7 @@ namespace osu.Game.Screens.Ranking
if (InternalChildren.Count == 0)
throw new InvalidOperationException("Score panel container is not attached.");
RemoveInternal(Panel);
RemoveInternal(Panel, false);
}
/// <summary>