mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Provide ruleset dependencies only to Compose Placement Blueprints
This commit is contained in:
@ -0,0 +1,34 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
|
||||
namespace osu.Game.Rulesets.UI
|
||||
{
|
||||
public class DrawableRulesetDependenciesProvidingContainer : Container
|
||||
{
|
||||
private Ruleset ruleset;
|
||||
|
||||
private DrawableRulesetDependencies rulesetDependencies = null!;
|
||||
|
||||
public DrawableRulesetDependenciesProvidingContainer(Ruleset ruleset)
|
||||
{
|
||||
this.ruleset = ruleset;
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
}
|
||||
|
||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||
{
|
||||
return rulesetDependencies = new DrawableRulesetDependencies(ruleset, base.CreateChildDependencies(parent));
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
base.Dispose(isDisposing);
|
||||
|
||||
rulesetDependencies?.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user