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