Make bdl beat divisor nullable

This commit is contained in:
smoogipoo
2018-03-20 14:01:06 +09:00
parent 50192b21e3
commit 786e6242e1
2 changed files with 7 additions and 6 deletions

View File

@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
@ -32,7 +33,7 @@ namespace osu.Game.Rulesets.Edit
private readonly List<Container> layerContainers = new List<Container>();
private readonly Bindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();
private readonly Bindable<int> beatDivisor = new Bindable<int>();
private readonly BindableBeatDivisor beatDivisor = new BindableBeatDivisor();
private IAdjustableClock adjustableClock;
@ -43,11 +44,13 @@ namespace osu.Game.Rulesets.Edit
RelativeSizeAxes = Axes.Both;
}
[BackgroundDependencyLoader]
private void load(OsuGameBase osuGame, IAdjustableClock adjustableClock, IFrameBasedClock framedClock, BindableBeatDivisor beatDivisor)
[BackgroundDependencyLoader(true)]
private void load([NotNull] OsuGameBase osuGame, [NotNull] IAdjustableClock adjustableClock, [NotNull] IFrameBasedClock framedClock, [CanBeNull] BindableBeatDivisor beatDivisor)
{
this.adjustableClock = adjustableClock;
this.beatDivisor.BindTo(beatDivisor);
if (beatDivisor != null)
this.beatDivisor.BindTo(beatDivisor);
beatmap.BindTo(osuGame.Beatmap);