mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 19:12:54 +08:00
Add a default icon when a ruleset isn't present
This commit is contained in:
parent
df20845fbb
commit
e7931ef4c7
@ -35,7 +35,8 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
new ConstrainedIconContainer
|
new ConstrainedIconContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Icon = beatmap.Ruleset.CreateInstance().CreateIcon()
|
// the null coalesce here is only present to make unit tests work (ruleset dlls aren't copied correctly for testing at the moment)
|
||||||
|
Icon = beatmap.Ruleset?.CreateInstance().CreateIcon() ?? new SpriteIcon { Icon = FontAwesome.fa_question_circle_o }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user