Improve naming

This commit is contained in:
Dean Herbert 2019-11-22 02:38:31 +09:00
parent f390e558c7
commit ab42fac43a
4 changed files with 11 additions and 11 deletions

View File

@ -3,9 +3,9 @@
namespace osu.Game.Configuration namespace osu.Game.Configuration
{ {
public enum BackgroundMode public enum BackgroundSource
{ {
Default, Skin,
Beatmap Beatmap
} }
} }

View File

@ -118,7 +118,7 @@ namespace osu.Game.Configuration
Set(OsuSetting.IntroSequence, IntroSequence.Triangles); Set(OsuSetting.IntroSequence, IntroSequence.Triangles);
Set(OsuSetting.BackgroundMode, BackgroundMode.Default); Set(OsuSetting.MenuBackgroundSource, BackgroundSource.Skin);
} }
public OsuConfigManager(Storage storage) public OsuConfigManager(Storage storage)
@ -189,6 +189,6 @@ namespace osu.Game.Configuration
IntroSequence, IntroSequence,
UIHoldActivationDelay, UIHoldActivationDelay,
HitLighting, HitLighting,
BackgroundMode MenuBackgroundSource
} }
} }

View File

@ -34,11 +34,11 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
Bindable = config.GetBindable<IntroSequence>(OsuSetting.IntroSequence), Bindable = config.GetBindable<IntroSequence>(OsuSetting.IntroSequence),
Items = Enum.GetValues(typeof(IntroSequence)).Cast<IntroSequence>() Items = Enum.GetValues(typeof(IntroSequence)).Cast<IntroSequence>()
}, },
new SettingsDropdown<BackgroundMode> new SettingsDropdown<BackgroundSource>
{ {
LabelText = "Background", LabelText = "Background source",
Bindable = config.GetBindable<BackgroundMode>(OsuSetting.BackgroundMode), Bindable = config.GetBindable<BackgroundSource>(OsuSetting.MenuBackgroundSource),
Items = Enum.GetValues(typeof(BackgroundMode)).Cast<BackgroundMode>() Items = Enum.GetValues(typeof(BackgroundSource)).Cast<BackgroundSource>()
} }
}; };
} }

View File

@ -26,7 +26,7 @@ namespace osu.Game.Screens.Backgrounds
private Bindable<User> user; private Bindable<User> user;
private Bindable<Skin> skin; private Bindable<Skin> skin;
private Bindable<BackgroundMode> mode; private Bindable<BackgroundSource> mode;
[Resolved] [Resolved]
private IBindable<WorkingBeatmap> beatmap { get; set; } private IBindable<WorkingBeatmap> beatmap { get; set; }
@ -41,7 +41,7 @@ namespace osu.Game.Screens.Backgrounds
{ {
user = api.LocalUser.GetBoundCopy(); user = api.LocalUser.GetBoundCopy();
skin = skinManager.CurrentSkin.GetBoundCopy(); skin = skinManager.CurrentSkin.GetBoundCopy();
mode = config.GetBindable<BackgroundMode>(OsuSetting.BackgroundMode); mode = config.GetBindable<BackgroundSource>(OsuSetting.MenuBackgroundSource);
user.ValueChanged += _ => Next(); user.ValueChanged += _ => Next();
skin.ValueChanged += _ => Next(); skin.ValueChanged += _ => Next();
@ -78,7 +78,7 @@ namespace osu.Game.Screens.Backgrounds
{ {
switch (mode.Value) switch (mode.Value)
{ {
case BackgroundMode.Beatmap: case BackgroundSource.Beatmap:
newBackground = new BeatmapBackground(beatmap.Value, backgroundName); newBackground = new BeatmapBackground(beatmap.Value, backgroundName);
break; break;