Pass down editor clocks through DI

This commit is contained in:
smoogipoo
2018-03-19 16:27:52 +09:00
parent abb5dcf678
commit e25d1f6982
14 changed files with 91 additions and 116 deletions

View File

@ -32,21 +32,20 @@ namespace osu.Game.Rulesets.Edit
private readonly Bindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();
private readonly IAdjustableClock adjustableClock;
private readonly IFrameBasedClock framedClock;
private IAdjustableClock adjustableClock;
protected HitObjectComposer(Ruleset ruleset, IAdjustableClock adjustableClock, IFrameBasedClock framedClock)
protected HitObjectComposer(Ruleset ruleset)
{
this.ruleset = ruleset;
this.adjustableClock = adjustableClock;
this.framedClock = framedClock;
RelativeSizeAxes = Axes.Both;
}
[BackgroundDependencyLoader]
private void load(OsuGameBase osuGame)
private void load(OsuGameBase osuGame, IAdjustableClock adjustableClock, IFrameBasedClock framedClock)
{
this.adjustableClock = adjustableClock;
beatmap.BindTo(osuGame.Beatmap);
try

View File

@ -6,7 +6,6 @@ using System.Collections.Generic;
using System.Linq;
using osu.Framework.Graphics;
using osu.Framework.Input.Bindings;
using osu.Framework.Timing;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Overlays.Settings;
@ -54,7 +53,7 @@ namespace osu.Game.Rulesets
public virtual PerformanceCalculator CreatePerformanceCalculator(Beatmap beatmap, Score score) => null;
public virtual HitObjectComposer CreateHitObjectComposer(IAdjustableClock adjustableClock, IFrameBasedClock framedClock) => null;
public virtual HitObjectComposer CreateHitObjectComposer() => null;
public virtual Drawable CreateIcon() => new SpriteIcon { Icon = FontAwesome.fa_question_circle };