mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Simplify construction of ScrollingInfo
This commit is contained in:
@ -24,15 +24,20 @@ namespace osu.Game.Rulesets.Mania.Edit
|
||||
{
|
||||
}
|
||||
|
||||
private DependencyContainer dependencies;
|
||||
|
||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||
{
|
||||
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||
dependencies.CacheAs<IScrollingInfo>(new ScrollingInfo());
|
||||
return dependencies;
|
||||
}
|
||||
=> dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||
|
||||
protected override RulesetContainer<ManiaHitObject> CreateRulesetContainer(Ruleset ruleset, WorkingBeatmap beatmap)
|
||||
=> new ManiaEditRulesetContainer(ruleset, beatmap);
|
||||
{
|
||||
var rulesetContainer = new ManiaEditRulesetContainer(ruleset, beatmap);
|
||||
|
||||
// This is the earliest we can cache the scrolling info to ourselves, before masks are added to the hierarchy and inject it
|
||||
dependencies.CacheAs(rulesetContainer.ScrollingInfo);
|
||||
|
||||
return rulesetContainer;
|
||||
}
|
||||
|
||||
protected override IReadOnlyList<HitObjectCompositionTool> CompositionTools => Array.Empty<HitObjectCompositionTool>();
|
||||
|
||||
@ -48,10 +53,5 @@ namespace osu.Game.Rulesets.Mania.Edit
|
||||
|
||||
return base.CreateBlueprintFor(hitObject);
|
||||
}
|
||||
|
||||
private class ScrollingInfo : IScrollingInfo
|
||||
{
|
||||
public IBindable<ScrollingDirection> Direction { get; } = new Bindable<ScrollingDirection>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user