mirror of
https://github.com/ppy/osu.git
synced 2025-02-05 02:03:04 +08:00
Fix seeding screen crashing on seedings with null mod
This commit is contained in:
parent
9a2fb8ca6c
commit
714255e6d4
@ -179,44 +179,48 @@ namespace osu.Game.Tournament.Screens.TeamIntro
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(TextureStore textures)
|
private void load(TextureStore textures)
|
||||||
{
|
{
|
||||||
|
FillFlowContainer row;
|
||||||
|
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
new FillFlowContainer
|
row = new FillFlowContainer
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
Direction = FillDirection.Horizontal,
|
Direction = FillDirection.Horizontal,
|
||||||
Spacing = new Vector2(5),
|
Spacing = new Vector2(5),
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new Sprite
|
|
||||||
{
|
|
||||||
Texture = textures.Get($"mods/{mods.ToLower()}"),
|
|
||||||
Scale = new Vector2(0.5f)
|
|
||||||
},
|
|
||||||
new Container
|
|
||||||
{
|
|
||||||
Size = new Vector2(50, 16),
|
|
||||||
CornerRadius = 10,
|
|
||||||
Masking = true,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new Box
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Colour = TournamentGame.ELEMENT_BACKGROUND_COLOUR,
|
|
||||||
},
|
|
||||||
new TournamentSpriteText
|
|
||||||
{
|
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
Text = seeding.ToString("#,0"),
|
|
||||||
Colour = TournamentGame.ELEMENT_FOREGROUND_COLOUR
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(mods))
|
||||||
|
{
|
||||||
|
row.Add(new Sprite
|
||||||
|
{
|
||||||
|
Texture = textures.Get($"mods/{mods.ToLower()}"),
|
||||||
|
Scale = new Vector2(0.5f)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
row.Add(new Container
|
||||||
|
{
|
||||||
|
Size = new Vector2(50, 16),
|
||||||
|
CornerRadius = 10,
|
||||||
|
Masking = true,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new Box
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Colour = TournamentGame.ELEMENT_BACKGROUND_COLOUR,
|
||||||
|
},
|
||||||
|
new TournamentSpriteText
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Text = seeding.ToString("#,0"),
|
||||||
|
Colour = TournamentGame.ELEMENT_FOREGROUND_COLOUR
|
||||||
|
},
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user