mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 12:45:09 +08:00
Rename "SeasonalBackgrounds" to "SeasonalBackgroundMode"
This commit is contained in:
parent
1db8dfd03e
commit
4e3fb615d2
@ -131,7 +131,7 @@ namespace osu.Game.Configuration
|
||||
Set(OsuSetting.IntroSequence, IntroSequence.Triangles);
|
||||
|
||||
Set(OsuSetting.MenuBackgroundSource, BackgroundSource.Skin);
|
||||
Set(OsuSetting.SeasonalBackgrounds, SeasonalBackgrounds.Sometimes);
|
||||
Set(OsuSetting.SeasonalBackgroundMode, SeasonalBackgroundMode.Sometimes);
|
||||
}
|
||||
|
||||
public OsuConfigManager(Storage storage)
|
||||
@ -241,6 +241,6 @@ namespace osu.Game.Configuration
|
||||
HitLighting,
|
||||
MenuBackgroundSource,
|
||||
GameplayDisableWinKey,
|
||||
SeasonalBackgrounds
|
||||
SeasonalBackgroundMode
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
namespace osu.Game.Configuration
|
||||
{
|
||||
public enum SeasonalBackgrounds
|
||||
public enum SeasonalBackgroundMode
|
||||
{
|
||||
Always,
|
||||
Sometimes,
|
@ -40,11 +40,11 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
Current = config.GetBindable<BackgroundSource>(OsuSetting.MenuBackgroundSource),
|
||||
Items = Enum.GetValues(typeof(BackgroundSource)).Cast<BackgroundSource>()
|
||||
},
|
||||
new SettingsDropdown<SeasonalBackgrounds>
|
||||
new SettingsDropdown<SeasonalBackgroundMode>
|
||||
{
|
||||
LabelText = "Seasonal backgrounds",
|
||||
Current = config.GetBindable<SeasonalBackgrounds>(OsuSetting.SeasonalBackgrounds),
|
||||
Items = Enum.GetValues(typeof(SeasonalBackgrounds)).Cast<SeasonalBackgrounds>()
|
||||
Current = config.GetBindable<SeasonalBackgroundMode>(OsuSetting.SeasonalBackgroundMode),
|
||||
Items = Enum.GetValues(typeof(SeasonalBackgroundMode)).Cast<SeasonalBackgroundMode>()
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ namespace osu.Game.Screens.Backgrounds
|
||||
private Bindable<Skin> skin;
|
||||
private Bindable<BackgroundSource> mode;
|
||||
private Bindable<IntroSequence> introSequence;
|
||||
private Bindable<SeasonalBackgrounds> showSeasonalBackgrounds;
|
||||
private Bindable<SeasonalBackgroundMode> seasonalBackgroundMode;
|
||||
private readonly SeasonalBackgroundLoader seasonalBackgroundLoader = new SeasonalBackgroundLoader();
|
||||
|
||||
[Resolved]
|
||||
@ -43,14 +43,14 @@ namespace osu.Game.Screens.Backgrounds
|
||||
skin = skinManager.CurrentSkin.GetBoundCopy();
|
||||
mode = config.GetBindable<BackgroundSource>(OsuSetting.MenuBackgroundSource);
|
||||
introSequence = config.GetBindable<IntroSequence>(OsuSetting.IntroSequence);
|
||||
showSeasonalBackgrounds = config.GetBindable<SeasonalBackgrounds>(OsuSetting.SeasonalBackgrounds);
|
||||
seasonalBackgroundMode = config.GetBindable<SeasonalBackgroundMode>(OsuSetting.SeasonalBackgroundMode);
|
||||
|
||||
user.ValueChanged += _ => Next();
|
||||
skin.ValueChanged += _ => Next();
|
||||
mode.ValueChanged += _ => Next();
|
||||
beatmap.ValueChanged += _ => Next();
|
||||
introSequence.ValueChanged += _ => Next();
|
||||
showSeasonalBackgrounds.ValueChanged += _ => Next();
|
||||
seasonalBackgroundMode.ValueChanged += _ => Next();
|
||||
|
||||
currentDisplay = RNG.Next(0, background_count);
|
||||
|
||||
@ -106,14 +106,14 @@ namespace osu.Game.Screens.Backgrounds
|
||||
else
|
||||
newBackground = new Background(backgroundName);
|
||||
|
||||
switch (showSeasonalBackgrounds.Value)
|
||||
switch (seasonalBackgroundMode.Value)
|
||||
{
|
||||
case SeasonalBackgrounds.Sometimes:
|
||||
case SeasonalBackgroundMode.Sometimes:
|
||||
if (seasonalBackgroundLoader.IsInSeason())
|
||||
goto case SeasonalBackgrounds.Always;
|
||||
goto case SeasonalBackgroundMode.Always;
|
||||
break;
|
||||
|
||||
case SeasonalBackgrounds.Always:
|
||||
case SeasonalBackgroundMode.Always:
|
||||
newBackground = seasonalBackgroundLoader.LoadBackground() ?? newBackground;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user