1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-18 22:52:57 +08:00
osu-lazer/osu.Game/Rulesets/UI/DrawableRulesetDependenciesProvidingContainer.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
1.2 KiB
C#
Raw Normal View History

// 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.Extensions.ObjectExtensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
namespace osu.Game.Rulesets.UI
{
2022-11-28 04:48:44 +08:00
public partial class DrawableRulesetDependenciesProvidingContainer : Container
{
2022-11-28 04:48:44 +08:00
private readonly 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);
if (rulesetDependencies.IsNotNull())
rulesetDependencies.Dispose();
}
}
}