mirror of
https://github.com/ppy/osu
synced 2024-12-23 23:33:36 +00:00
Make taiko proxy containers use LifetimeManagementContainer
This commit is contained in:
parent
0f25ad8b87
commit
7cc92e2fad
@ -44,9 +44,8 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
private readonly JudgementContainer<DrawableTaikoJudgement> judgementContainer;
|
||||
internal readonly HitTarget HitTarget;
|
||||
|
||||
private readonly Container topLevelHitContainer;
|
||||
|
||||
private readonly Container barlineContainer;
|
||||
private readonly ProxyContainer topLevelHitContainer;
|
||||
private readonly ProxyContainer barlineContainer;
|
||||
|
||||
private readonly Container overlayBackgroundContainer;
|
||||
private readonly Container backgroundContainer;
|
||||
@ -108,7 +107,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
}
|
||||
}
|
||||
},
|
||||
barlineContainer = new Container
|
||||
barlineContainer = new ProxyContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Padding = new MarginPadding { Left = HIT_TARGET_OFFSET }
|
||||
@ -183,7 +182,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
}
|
||||
}
|
||||
},
|
||||
topLevelHitContainer = new Container
|
||||
topLevelHitContainer = new ProxyContainer
|
||||
{
|
||||
Name = "Top level hit objects",
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
@ -256,5 +255,15 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private class ProxyContainer : LifetimeManagementContainer
|
||||
{
|
||||
public new MarginPadding Padding
|
||||
{
|
||||
set => base.Padding = value;
|
||||
}
|
||||
|
||||
public void Add(Drawable proxy) => AddInternal(proxy);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user