mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 18:03:11 +08:00
Move DrawableRuleset.Audio
to a less generic level
This commit is contained in:
parent
c540d78fbc
commit
1acc536248
@ -66,6 +66,10 @@ namespace osu.Game.Rulesets.UI
|
||||
|
||||
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 @@ namespace osu.Game.Rulesets.UI
|
||||
|
||||
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 @@ namespace osu.Game.Rulesets.UI
|
||||
[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 @@ namespace osu.Game.Rulesets.UI
|
||||
/// </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
Block a user