mirror of
https://github.com/ppy/osu
synced 2024-12-12 18:07:52 +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
|
else
|
||||||
newBackground = new Background(backgroundName);
|
newBackground = new Background(backgroundName);
|
||||||
|
|
||||||
switch (seasonalBackgroundMode.Value)
|
if (seasonalBackgroundMode.Value == SeasonalBackgroundMode.Always
|
||||||
|
|| seasonalBackgroundMode.Value == SeasonalBackgroundMode.Sometimes && seasonalBackgroundLoader.IsInSeason)
|
||||||
{
|
{
|
||||||
case SeasonalBackgroundMode.Sometimes:
|
newBackground = seasonalBackgroundLoader.LoadBackground() ?? newBackground;
|
||||||
if (seasonalBackgroundLoader.IsInSeason)
|
|
||||||
goto case SeasonalBackgroundMode.Always;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SeasonalBackgroundMode.Always:
|
|
||||||
newBackground = seasonalBackgroundLoader.LoadBackground() ?? newBackground;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
newBackground.Depth = currentDisplay;
|
newBackground.Depth = currentDisplay;
|
||||||
|
Loading…
Reference in New Issue
Block a user