mirror of
https://github.com/ppy/osu
synced 2024-12-11 17:42:28 +00:00
Convert switch to if
This commit is contained in:
parent
d19dd4eef6
commit
6f6a8e2a8f
@ -106,16 +106,10 @@ namespace osu.Game.Screens.Backgrounds
|
||||
else
|
||||
newBackground = new Background(backgroundName);
|
||||
|
||||
switch (seasonalBackgroundMode.Value)
|
||||
if (seasonalBackgroundMode.Value == SeasonalBackgroundMode.Always
|
||||
|| seasonalBackgroundMode.Value == SeasonalBackgroundMode.Sometimes && seasonalBackgroundLoader.IsInSeason)
|
||||
{
|
||||
case SeasonalBackgroundMode.Sometimes:
|
||||
if (seasonalBackgroundLoader.IsInSeason)
|
||||
goto case SeasonalBackgroundMode.Always;
|
||||
break;
|
||||
|
||||
case SeasonalBackgroundMode.Always:
|
||||
newBackground = seasonalBackgroundLoader.LoadBackground() ?? newBackground;
|
||||
break;
|
||||
newBackground = seasonalBackgroundLoader.LoadBackground() ?? newBackground;
|
||||
}
|
||||
|
||||
newBackground.Depth = currentDisplay;
|
||||
|
Loading…
Reference in New Issue
Block a user