mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 09:43:10 +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 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 Container FrameStableComponents { get; } = new Container { RelativeSizeAxes = Axes.Both };
|
||||||
|
|
||||||
public override IFrameStableClock FrameStableClock => frameStabilityContainer;
|
public override IFrameStableClock FrameStableClock => frameStabilityContainer;
|
||||||
@ -102,14 +106,6 @@ namespace osu.Game.Rulesets.UI
|
|||||||
|
|
||||||
private DrawableRulesetDependencies dependencies;
|
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>
|
/// <summary>
|
||||||
/// Creates a ruleset visualisation for the provided ruleset and beatmap.
|
/// Creates a ruleset visualisation for the provided ruleset and beatmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -172,30 +168,22 @@ namespace osu.Game.Rulesets.UI
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(CancellationToken? cancellationToken)
|
private void load(CancellationToken? cancellationToken)
|
||||||
{
|
{
|
||||||
AudioContainer audioContainer;
|
|
||||||
|
|
||||||
InternalChild = frameStabilityContainer = new FrameStabilityContainer(GameplayStartTime)
|
InternalChild = frameStabilityContainer = new FrameStabilityContainer(GameplayStartTime)
|
||||||
{
|
{
|
||||||
FrameStablePlayback = FrameStablePlayback,
|
FrameStablePlayback = FrameStablePlayback,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
FrameStableComponents,
|
FrameStableComponents,
|
||||||
audioContainer = new AudioContainer
|
audioContainer.WithChild(KeyBindingInputManager
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Child = KeyBindingInputManager
|
|
||||||
.WithChildren(new Drawable[]
|
.WithChildren(new Drawable[]
|
||||||
{
|
{
|
||||||
CreatePlayfieldAdjustmentContainer()
|
CreatePlayfieldAdjustmentContainer()
|
||||||
.WithChild(Playfield),
|
.WithChild(Playfield),
|
||||||
Overlays
|
Overlays
|
||||||
}),
|
})),
|
||||||
},
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Audio = audioContainer;
|
|
||||||
|
|
||||||
if ((ResumeOverlay = CreateResumeOverlay()) != null)
|
if ((ResumeOverlay = CreateResumeOverlay()) != null)
|
||||||
{
|
{
|
||||||
AddInternal(CreateInputManager()
|
AddInternal(CreateInputManager()
|
||||||
@ -438,13 +426,21 @@ namespace osu.Game.Rulesets.UI
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly BindableBool IsPaused = new BindableBool();
|
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>
|
/// <summary>
|
||||||
/// The playfield.
|
/// The playfield.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract Playfield Playfield { get; }
|
public abstract Playfield Playfield { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public abstract Container Overlays { get; }
|
public abstract Container Overlays { get; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user