mirror of
https://github.com/ppy/osu
synced 2024-12-13 02:17:32 +00:00
Make bdl beat divisor nullable
This commit is contained in:
parent
50192b21e3
commit
786e6242e1
@ -14,7 +14,6 @@ using osu.Game.Rulesets.Osu;
|
||||
using osu.Game.Rulesets.Osu.Edit;
|
||||
using osu.Game.Rulesets.Osu.Edit.Layers.Selection.Overlays;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
using osu.Game.Screens.Edit.Screens.Compose;
|
||||
using osu.Game.Screens.Edit.Screens.Compose.Layers;
|
||||
using osu.Game.Tests.Beatmaps;
|
||||
|
||||
@ -69,7 +68,6 @@ namespace osu.Game.Tests.Visual
|
||||
var clock = new DecoupleableInterpolatingFramedClock { IsCoupled = false };
|
||||
dependencies.CacheAs<IAdjustableClock>(clock);
|
||||
dependencies.CacheAs<IFrameBasedClock>(clock);
|
||||
dependencies.Cache(new BindableBeatDivisor());
|
||||
|
||||
Child = new OsuHitObjectComposer(new OsuRuleset());
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user