mirror of https://github.com/ppy/osu
Move `DrawableRuleset.Audio` to a less generic level
This commit is contained in:
parent
c540d78fbc
commit
1acc536248
|
@ -66,6 +66,10 @@ public abstract partial class DrawableRuleset<TObject> : DrawableRuleset, IProvi
|
|||
|
||||
public override Container Overlays { get; } = new Container { RelativeSizeAxes = Axes.Both };
|
||||
|
||||
public override IAdjustableAudioComponent Audio => audioContainer;
|
||||
|
||||
private readonly AudioContainer audioContainer = new AudioContainer { RelativeSizeAxes = Axes.Both };
|
||||
|
||||
public override Container FrameStableComponents { get; } = new Container { RelativeSizeAxes = Axes.Both };
|
||||
|
||||
public override IFrameStableClock FrameStableClock => frameStabilityContainer;
|
||||
|
@ -102,14 +106,6 @@ internal override bool FrameStablePlayback
|
|||
|
||||
private DrawableRulesetDependencies dependencies;
|
||||
|
||||
/// <summary>
|
||||
/// Audio adjustments which are applied to the playfield.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Does not affect <see cref="Overlays"/>.
|
||||
/// </remarks>
|
||||
public IAdjustableAudioComponent Audio { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Creates a ruleset visualisation for the provided ruleset and beatmap.
|
||||
/// </summary>
|
||||
|
@ -172,30 +168,22 @@ protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnl
|
|||
[BackgroundDependencyLoader]
|
||||
private void load(CancellationToken? cancellationToken)
|
||||
{
|
||||
AudioContainer audioContainer;
|
||||
|
||||
InternalChild = frameStabilityContainer = new FrameStabilityContainer(GameplayStartTime)
|
||||
{
|
||||
FrameStablePlayback = FrameStablePlayback,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
FrameStableComponents,
|
||||
audioContainer = new AudioContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Child = KeyBindingInputManager
|
||||
.WithChildren(new Drawable[]
|
||||
{
|
||||
CreatePlayfieldAdjustmentContainer()
|
||||
.WithChild(Playfield),
|
||||
Overlays
|
||||
}),
|
||||
},
|
||||
audioContainer.WithChild(KeyBindingInputManager
|
||||
.WithChildren(new Drawable[]
|
||||
{
|
||||
CreatePlayfieldAdjustmentContainer()
|
||||
.WithChild(Playfield),
|
||||
Overlays
|
||||
})),
|
||||
}
|
||||
};
|
||||
|
||||
Audio = audioContainer;
|
||||
|
||||
if ((ResumeOverlay = CreateResumeOverlay()) != null)
|
||||
{
|
||||
AddInternal(CreateInputManager()
|
||||
|
@ -438,13 +426,21 @@ public abstract partial class DrawableRuleset : CompositeDrawable
|
|||
/// </summary>
|
||||
public readonly BindableBool IsPaused = new BindableBool();
|
||||
|
||||
/// <summary>
|
||||
/// Audio adjustments which are applied to the playfield.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Does not affect <see cref="Overlays"/>.
|
||||
/// </remarks>
|
||||
public abstract IAdjustableAudioComponent Audio { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The playfield.
|
||||
/// </summary>
|
||||
public abstract Playfield Playfield { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Content to be placed above hitobjects. Will be affected by frame stability.
|
||||
/// Content to be placed above hitobjects. Will be affected by frame stability and adjustments applied to <see cref="Audio"/>.
|
||||
/// </summary>
|
||||
public abstract Container Overlays { get; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue