Load seasonal backgrounds according to setting

This commit is contained in:
Max Hübner 2020-10-29 18:04:48 +01:00
parent d9846fad37
commit fb1e09b3e7

View File

@ -106,6 +106,18 @@ namespace osu.Game.Screens.Backgrounds
else
newBackground = new Background(backgroundName);
switch (showSeasonalBackgrounds.Value)
{
case SeasonalBackgrounds.Sometimes:
if (RNG.NextBool())
goto case SeasonalBackgrounds.Always;
break;
case SeasonalBackgrounds.Always:
newBackground = seasonalBackgroundLoader.LoadBackground() ?? newBackground;
break;
}
newBackground.Depth = currentDisplay;
return newBackground;