mirror of
https://github.com/osukey/osukey.git
synced 2025-05-04 13:17:22 +09:00
Fix tests which rely on HUDOverlay
's DrawableRuleset
being nullable
This commit is contained in:
parent
209d41ee9d
commit
a01c3090e4
@ -102,20 +102,22 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
public HUDOverlay(DrawableRuleset drawableRuleset, IReadOnlyList<Mod> mods, bool alwaysShowLeaderboard = true)
|
public HUDOverlay(DrawableRuleset drawableRuleset, IReadOnlyList<Mod> mods, bool alwaysShowLeaderboard = true)
|
||||||
{
|
{
|
||||||
SkinComponentsContainer rulesetComponents;
|
Drawable rulesetComponents;
|
||||||
|
|
||||||
this.drawableRuleset = drawableRuleset;
|
this.drawableRuleset = drawableRuleset;
|
||||||
this.mods = mods;
|
this.mods = mods;
|
||||||
|
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
CreateFailingLayer(),
|
CreateFailingLayer(),
|
||||||
//Needs to be initialized before skinnable drawables.
|
//Needs to be initialized before skinnable drawables.
|
||||||
tally = new JudgementTally(),
|
tally = new JudgementTally(),
|
||||||
mainComponents = new HUDComponentsContainer { AlwaysPresent = true, },
|
mainComponents = new HUDComponentsContainer { AlwaysPresent = true, },
|
||||||
rulesetComponents = new HUDComponentsContainer(drawableRuleset.Ruleset.RulesetInfo) { AlwaysPresent = true, },
|
rulesetComponents = drawableRuleset != null
|
||||||
|
? new HUDComponentsContainer(drawableRuleset.Ruleset.RulesetInfo) { AlwaysPresent = true, }
|
||||||
|
: Empty(),
|
||||||
topRightElements = new FillFlowContainer
|
topRightElements = new FillFlowContainer
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopRight,
|
Anchor = Anchor.TopRight,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user