mirror of
https://github.com/ppy/osu.git
synced 2025-02-09 19:02:58 +08:00
Initialise container earlier to avoid null reference failures
This commit is contained in:
parent
1e03bd11a3
commit
064aaeb60e
@ -65,8 +65,6 @@ namespace osu.Game.Rulesets.UI
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public override Playfield Playfield => playfield.Value;
|
public override Playfield Playfield => playfield.Value;
|
||||||
|
|
||||||
private PlayfieldAdjustmentContainer playfieldAdjustmentContainer;
|
|
||||||
|
|
||||||
public override PlayfieldAdjustmentContainer PlayfieldAdjustmentContainer => playfieldAdjustmentContainer;
|
public override PlayfieldAdjustmentContainer PlayfieldAdjustmentContainer => playfieldAdjustmentContainer;
|
||||||
|
|
||||||
public override Container Overlays { get; } = new Container { RelativeSizeAxes = Axes.Both };
|
public override Container Overlays { get; } = new Container { RelativeSizeAxes = Axes.Both };
|
||||||
@ -79,6 +77,8 @@ namespace osu.Game.Rulesets.UI
|
|||||||
|
|
||||||
public override IFrameStableClock FrameStableClock => frameStabilityContainer;
|
public override IFrameStableClock FrameStableClock => frameStabilityContainer;
|
||||||
|
|
||||||
|
private readonly PlayfieldAdjustmentContainer playfieldAdjustmentContainer;
|
||||||
|
|
||||||
private bool allowBackwardsSeeks;
|
private bool allowBackwardsSeeks;
|
||||||
|
|
||||||
public override bool AllowBackwardsSeeks
|
public override bool AllowBackwardsSeeks
|
||||||
@ -144,6 +144,7 @@ namespace osu.Game.Rulesets.UI
|
|||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
|
||||||
KeyBindingInputManager = CreateInputManager();
|
KeyBindingInputManager = CreateInputManager();
|
||||||
|
playfieldAdjustmentContainer = CreatePlayfieldAdjustmentContainer();
|
||||||
playfield = new Lazy<Playfield>(() => CreatePlayfield().With(p =>
|
playfield = new Lazy<Playfield>(() => CreatePlayfield().With(p =>
|
||||||
{
|
{
|
||||||
p.NewResult += (_, r) => NewResult?.Invoke(r);
|
p.NewResult += (_, r) => NewResult?.Invoke(r);
|
||||||
@ -195,8 +196,7 @@ namespace osu.Game.Rulesets.UI
|
|||||||
audioContainer.WithChild(KeyBindingInputManager
|
audioContainer.WithChild(KeyBindingInputManager
|
||||||
.WithChildren(new Drawable[]
|
.WithChildren(new Drawable[]
|
||||||
{
|
{
|
||||||
playfieldAdjustmentContainer = CreatePlayfieldAdjustmentContainer()
|
playfieldAdjustmentContainer.WithChild(Playfield),
|
||||||
.WithChild(Playfield),
|
|
||||||
Overlays
|
Overlays
|
||||||
})),
|
})),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user