diff --git a/osu.Game.Rulesets.Mania/Edit/Blueprints/ManiaSelectionBlueprint.cs b/osu.Game.Rulesets.Mania/Edit/Blueprints/ManiaSelectionBlueprint.cs index bd1e5c22b3..1b5cb03204 100644 --- a/osu.Game.Rulesets.Mania/Edit/Blueprints/ManiaSelectionBlueprint.cs +++ b/osu.Game.Rulesets.Mania/Edit/Blueprints/ManiaSelectionBlueprint.cs @@ -14,12 +14,12 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints where T : ManiaHitObject { [Resolved] - private HitObjectComposer composer { get; set; } + private IPlayfieldProvider playfieldProvider { get; set; } [Resolved] private IScrollingInfo scrollingInfo { get; set; } - protected ScrollingHitObjectContainer HitObjectContainer => ((ManiaPlayfield)composer.Playfield).GetColumn(HitObject.Column).HitObjectContainer; + protected ScrollingHitObjectContainer HitObjectContainer => ((ManiaPlayfield)playfieldProvider.Playfield).GetColumn(HitObject.Column).HitObjectContainer; protected ManiaSelectionBlueprint(T hitObject) : base(hitObject) diff --git a/osu.Game/Rulesets/Edit/HitObjectComposer.cs b/osu.Game/Rulesets/Edit/HitObjectComposer.cs index b47cf97a4d..67c18b7e3c 100644 --- a/osu.Game/Rulesets/Edit/HitObjectComposer.cs +++ b/osu.Game/Rulesets/Edit/HitObjectComposer.cs @@ -415,7 +415,8 @@ namespace osu.Game.Rulesets.Edit /// [Cached(typeof(HitObjectComposer))] [Cached(typeof(IPositionSnapProvider))] - public abstract class HitObjectComposer : CompositeDrawable, IPositionSnapProvider + [Cached(typeof(IPlayfieldProvider))] + public abstract class HitObjectComposer : CompositeDrawable, IPositionSnapProvider, IPlayfieldProvider { protected HitObjectComposer() { diff --git a/osu.Game/Rulesets/Edit/IPlayfieldProvider.cs b/osu.Game/Rulesets/Edit/IPlayfieldProvider.cs new file mode 100644 index 0000000000..4bfd4d2728 --- /dev/null +++ b/osu.Game/Rulesets/Edit/IPlayfieldProvider.cs @@ -0,0 +1,12 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using osu.Game.Rulesets.UI; + +namespace osu.Game.Rulesets.Edit +{ + public interface IPlayfieldProvider + { + Playfield Playfield { get; } + } +}