diff --git a/osu.Desktop/Overlays/VersionManager.cs b/osu.Desktop/Overlays/VersionManager.cs index da9ff79d3a..5b67d528ae 100644 --- a/osu.Desktop/Overlays/VersionManager.cs +++ b/osu.Desktop/Overlays/VersionManager.cs @@ -22,13 +22,13 @@ namespace osu.Desktop.Overlays { public class VersionManager : OverlayContainer { - private GameConfigManager config; + private OsuConfigManager config; private OsuGameBase game; private NotificationOverlay notificationOverlay; private GameHost host; [BackgroundDependencyLoader] - private void load(NotificationOverlay notification, OsuColour colours, TextureStore textures, OsuGameBase game, GameConfigManager config, GameHost host) + private void load(NotificationOverlay notification, OsuColour colours, TextureStore textures, OsuGameBase game, OsuConfigManager config, GameHost host) { notificationOverlay = notification; this.config = config; @@ -95,10 +95,10 @@ namespace osu.Desktop.Overlays base.LoadComplete(); var version = game.Version; - var lastVersion = config.Get(GameSetting.Version); + var lastVersion = config.Get(OsuSetting.Version); if (game.IsDeployedBuild && version != lastVersion) { - config.Set(GameSetting.Version, version); + config.Set(OsuSetting.Version, version); // only show a notification if we've previously saved a version to the config file (ie. not the first run). if (!string.IsNullOrEmpty(lastVersion)) diff --git a/osu.Game.Rulesets.Mania.Tests/TestCaseEditor.cs b/osu.Game.Rulesets.Mania.Tests/TestCaseEditor.cs index 32f455bb73..7b865cefa7 100644 --- a/osu.Game.Rulesets.Mania.Tests/TestCaseEditor.cs +++ b/osu.Game.Rulesets.Mania.Tests/TestCaseEditor.cs @@ -25,8 +25,8 @@ namespace osu.Game.Rulesets.Mania.Tests [BackgroundDependencyLoader] private void load(RulesetConfigCache configCache) { - var config = (ManiaConfigManager)configCache.GetConfigFor(Ruleset.Value.CreateInstance()); - config.BindWith(ManiaSetting.ScrollDirection, direction); + var config = (ManiaRulesetConfigManager)configCache.GetConfigFor(Ruleset.Value.CreateInstance()); + config.BindWith(ManiaRulesetSetting.ScrollDirection, direction); } } } diff --git a/osu.Game.Rulesets.Mania/Configuration/ManiaConfigManager.cs b/osu.Game.Rulesets.Mania/Configuration/ManiaRulesetConfigManager.cs similarity index 57% rename from osu.Game.Rulesets.Mania/Configuration/ManiaConfigManager.cs rename to osu.Game.Rulesets.Mania/Configuration/ManiaRulesetConfigManager.cs index 4e0ad31105..b591f9da22 100644 --- a/osu.Game.Rulesets.Mania/Configuration/ManiaConfigManager.cs +++ b/osu.Game.Rulesets.Mania/Configuration/ManiaRulesetConfigManager.cs @@ -8,9 +8,9 @@ using osu.Game.Rulesets.Mania.UI; namespace osu.Game.Rulesets.Mania.Configuration { - public class ManiaConfigManager : RulesetConfigManager + public class ManiaRulesetConfigManager : RulesetConfigManager { - public ManiaConfigManager(SettingsStore settings, RulesetInfo ruleset, int? variant = null) + public ManiaRulesetConfigManager(SettingsStore settings, RulesetInfo ruleset, int? variant = null) : base(settings, ruleset, variant) { } @@ -19,17 +19,17 @@ namespace osu.Game.Rulesets.Mania.Configuration { base.InitialiseDefaults(); - Set(ManiaSetting.ScrollTime, 2250.0, 50.0, 10000.0, 50.0); - Set(ManiaSetting.ScrollDirection, ManiaScrollingDirection.Down); + Set(ManiaRulesetSetting.ScrollTime, 2250.0, 50.0, 10000.0, 50.0); + Set(ManiaRulesetSetting.ScrollDirection, ManiaScrollingDirection.Down); } public override TrackedSettings CreateTrackedSettings() => new TrackedSettings { - new TrackedSetting(ManiaSetting.ScrollTime, v => new SettingDescription(v, "Scroll Time", $"{v}ms")) + new TrackedSetting(ManiaRulesetSetting.ScrollTime, v => new SettingDescription(v, "Scroll Time", $"{v}ms")) }; } - public enum ManiaSetting + public enum ManiaRulesetSetting { ScrollTime, ScrollDirection diff --git a/osu.Game.Rulesets.Mania/ManiaRuleset.cs b/osu.Game.Rulesets.Mania/ManiaRuleset.cs index 57728dd134..c589418450 100644 --- a/osu.Game.Rulesets.Mania/ManiaRuleset.cs +++ b/osu.Game.Rulesets.Mania/ManiaRuleset.cs @@ -162,7 +162,7 @@ namespace osu.Game.Rulesets.Mania public override IConvertibleReplayFrame CreateConvertibleReplayFrame() => new ManiaReplayFrame(); - public override IRulesetConfigManager CreateConfig(SettingsStore settings) => new ManiaConfigManager(settings, RulesetInfo); + public override IRulesetConfigManager CreateConfig(SettingsStore settings) => new ManiaRulesetConfigManager(settings, RulesetInfo); public override RulesetSettingsSubsection CreateSettings() => new ManiaSettingsSubsection(this); diff --git a/osu.Game.Rulesets.Mania/ManiaSettingsSubsection.cs b/osu.Game.Rulesets.Mania/ManiaSettingsSubsection.cs index 2ab40b2bc6..2ebfd0cfc1 100644 --- a/osu.Game.Rulesets.Mania/ManiaSettingsSubsection.cs +++ b/osu.Game.Rulesets.Mania/ManiaSettingsSubsection.cs @@ -22,19 +22,19 @@ namespace osu.Game.Rulesets.Mania [BackgroundDependencyLoader] private void load() { - var config = (ManiaConfigManager)Config; + var config = (ManiaRulesetConfigManager)Config; Children = new Drawable[] { new SettingsEnumDropdown { LabelText = "Scrolling direction", - Bindable = config.GetBindable(ManiaSetting.ScrollDirection) + Bindable = config.GetBindable(ManiaRulesetSetting.ScrollDirection) }, new SettingsSlider { LabelText = "Scroll speed", - Bindable = config.GetBindable(ManiaSetting.ScrollTime) + Bindable = config.GetBindable(ManiaRulesetSetting.ScrollTime) }, }; } diff --git a/osu.Game.Rulesets.Mania/UI/ManiaRulesetContainer.cs b/osu.Game.Rulesets.Mania/UI/ManiaRulesetContainer.cs index 892ad584dc..5b9debf42b 100644 --- a/osu.Game.Rulesets.Mania/UI/ManiaRulesetContainer.cs +++ b/osu.Game.Rulesets.Mania/UI/ManiaRulesetContainer.cs @@ -35,7 +35,7 @@ namespace osu.Game.Rulesets.Mania.UI public IEnumerable BarLines; - protected new ManiaConfigManager Config => (ManiaConfigManager)base.Config; + protected new ManiaRulesetConfigManager Config => (ManiaRulesetConfigManager)base.Config; private readonly Bindable configDirection = new Bindable(); @@ -75,10 +75,10 @@ namespace osu.Game.Rulesets.Mania.UI { BarLines.ForEach(Playfield.Add); - Config.BindWith(ManiaSetting.ScrollDirection, configDirection); + Config.BindWith(ManiaRulesetSetting.ScrollDirection, configDirection); configDirection.BindValueChanged(v => Direction.Value = (ScrollingDirection)v, true); - Config.BindWith(ManiaSetting.ScrollTime, TimeRange); + Config.BindWith(ManiaRulesetSetting.ScrollTime, TimeRange); } /// diff --git a/osu.Game.Rulesets.Osu.Tests/TestCaseSlider.cs b/osu.Game.Rulesets.Osu.Tests/TestCaseSlider.cs index 6baa02fd1f..5838e1af6a 100644 --- a/osu.Game.Rulesets.Osu.Tests/TestCaseSlider.cs +++ b/osu.Game.Rulesets.Osu.Tests/TestCaseSlider.cs @@ -46,7 +46,7 @@ namespace osu.Game.Rulesets.Osu.Tests var dependencies = new DependencyContainer(base.CreateChildDependencies(parent)); var configCache = dependencies.Get(); - dependencies.CacheAs((OsuConfigManager)configCache.GetConfigFor(new OsuRuleset())); + dependencies.CacheAs((OsuRulesetConfigManager)configCache.GetConfigFor(new OsuRuleset())); return dependencies; } diff --git a/osu.Game.Rulesets.Osu.Tests/TestCaseSliderSelectionBlueprint.cs b/osu.Game.Rulesets.Osu.Tests/TestCaseSliderSelectionBlueprint.cs index a6f7a0b0d7..4279925db5 100644 --- a/osu.Game.Rulesets.Osu.Tests/TestCaseSliderSelectionBlueprint.cs +++ b/osu.Game.Rulesets.Osu.Tests/TestCaseSliderSelectionBlueprint.cs @@ -36,7 +36,7 @@ namespace osu.Game.Rulesets.Osu.Tests var dependencies = new DependencyContainer(base.CreateChildDependencies(parent)); var configCache = dependencies.Get(); - dependencies.CacheAs((OsuConfigManager)configCache.GetConfigFor(new OsuRuleset())); + dependencies.CacheAs((OsuRulesetConfigManager)configCache.GetConfigFor(new OsuRuleset())); return dependencies; } diff --git a/osu.Game.Rulesets.Osu/Configuration/OsuConfigManager.cs b/osu.Game.Rulesets.Osu/Configuration/OsuRulesetConfigManager.cs similarity index 60% rename from osu.Game.Rulesets.Osu/Configuration/OsuConfigManager.cs rename to osu.Game.Rulesets.Osu/Configuration/OsuRulesetConfigManager.cs index 4fa49faf1d..d931fb0eff 100644 --- a/osu.Game.Rulesets.Osu/Configuration/OsuConfigManager.cs +++ b/osu.Game.Rulesets.Osu/Configuration/OsuRulesetConfigManager.cs @@ -6,9 +6,9 @@ using osu.Game.Rulesets.Configuration; namespace osu.Game.Rulesets.Osu.Configuration { - public class OsuConfigManager : RulesetConfigManager + public class OsuRulesetConfigManager : RulesetConfigManager { - public OsuConfigManager(SettingsStore settings, RulesetInfo ruleset, int? variant = null) + public OsuRulesetConfigManager(SettingsStore settings, RulesetInfo ruleset, int? variant = null) : base(settings, ruleset, variant) { } @@ -17,12 +17,12 @@ namespace osu.Game.Rulesets.Osu.Configuration { base.InitialiseDefaults(); - Set(OsuSetting.SnakingInSliders, true); - Set(OsuSetting.SnakingOutSliders, true); + Set(OsuRulesetSetting.SnakingInSliders, true); + Set(OsuRulesetSetting.SnakingOutSliders, true); } } - public enum OsuSetting + public enum OsuRulesetSetting { SnakingInSliders, SnakingOutSliders diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs index 5ad47a8c27..b107fcc028 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs @@ -93,10 +93,10 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables } [BackgroundDependencyLoader] - private void load(OsuConfigManager config) + private void load(OsuRulesetConfigManager rulesetConfig) { - config.BindWith(OsuSetting.SnakingInSliders, Body.SnakingIn); - config.BindWith(OsuSetting.SnakingOutSliders, Body.SnakingOut); + rulesetConfig.BindWith(OsuRulesetSetting.SnakingInSliders, Body.SnakingIn); + rulesetConfig.BindWith(OsuRulesetSetting.SnakingOutSliders, Body.SnakingOut); positionBindable.BindValueChanged(_ => Position = HitObject.StackedPosition); scaleBindable.BindValueChanged(v => diff --git a/osu.Game.Rulesets.Osu/OsuRuleset.cs b/osu.Game.Rulesets.Osu/OsuRuleset.cs index 997b2a3c56..8e22d82e30 100644 --- a/osu.Game.Rulesets.Osu/OsuRuleset.cs +++ b/osu.Game.Rulesets.Osu/OsuRuleset.cs @@ -148,7 +148,7 @@ namespace osu.Game.Rulesets.Osu public override IConvertibleReplayFrame CreateConvertibleReplayFrame() => new OsuReplayFrame(); - public override IRulesetConfigManager CreateConfig(SettingsStore settings) => new OsuConfigManager(settings, RulesetInfo); + public override IRulesetConfigManager CreateConfig(SettingsStore settings) => new OsuRulesetConfigManager(settings, RulesetInfo); public OsuRuleset(RulesetInfo rulesetInfo = null) : base(rulesetInfo) diff --git a/osu.Game.Rulesets.Osu/UI/Cursor/GameplayCursor.cs b/osu.Game.Rulesets.Osu/UI/Cursor/GameplayCursor.cs index 0e7566a15d..3fef769174 100644 --- a/osu.Game.Rulesets.Osu/UI/Cursor/GameplayCursor.cs +++ b/osu.Game.Rulesets.Osu/UI/Cursor/GameplayCursor.cs @@ -112,7 +112,7 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor } [BackgroundDependencyLoader] - private void load(GameConfigManager config, IBindableBeatmap beatmap) + private void load(OsuConfigManager config, IBindableBeatmap beatmap) { InternalChild = expandTarget = new Container { @@ -185,10 +185,10 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor this.beatmap.BindTo(beatmap); this.beatmap.ValueChanged += v => calculateScale(); - cursorScale = config.GetBindable(GameSetting.GameplayCursorSize); + cursorScale = config.GetBindable(OsuSetting.GameplayCursorSize); cursorScale.ValueChanged += v => calculateScale(); - autoCursorScale = config.GetBindable(GameSetting.AutoCursorSize); + autoCursorScale = config.GetBindable(OsuSetting.AutoCursorSize); autoCursorScale.ValueChanged += v => calculateScale(); calculateScale(); diff --git a/osu.Game.Rulesets.Osu/UI/OsuRulesetContainer.cs b/osu.Game.Rulesets.Osu/UI/OsuRulesetContainer.cs index fcb6b0204d..b096b8992d 100644 --- a/osu.Game.Rulesets.Osu/UI/OsuRulesetContainer.cs +++ b/osu.Game.Rulesets.Osu/UI/OsuRulesetContainer.cs @@ -21,7 +21,7 @@ namespace osu.Game.Rulesets.Osu.UI { public class OsuRulesetContainer : RulesetContainer { - protected new OsuConfigManager Config => (OsuConfigManager)base.Config; + protected new OsuRulesetConfigManager Config => (OsuRulesetConfigManager)base.Config; public OsuRulesetContainer(Ruleset ruleset, WorkingBeatmap beatmap) : base(ruleset, beatmap) diff --git a/osu.Game.Rulesets.Osu/UI/OsuSettings.cs b/osu.Game.Rulesets.Osu/UI/OsuSettings.cs deleted file mode 100644 index 25c009b117..0000000000 --- a/osu.Game.Rulesets.Osu/UI/OsuSettings.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2007-2018 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Framework.Allocation; -using osu.Framework.Graphics; -using osu.Game.Configuration; -using osu.Game.Overlays.Settings; - -namespace osu.Game.Rulesets.Osu.UI -{ - public class OsuSettings : RulesetSettingsSubsection - { - protected override string Header => "osu!"; - - public OsuSettings(Ruleset ruleset) - : base(ruleset) - { - } - - [BackgroundDependencyLoader] - private void load(OsuConfigManager config) - { - Children = new Drawable[] - { - new SettingsCheckbox - { - LabelText = "Snaking in sliders", - Bindable = config.GetBindable(OsuSetting.SnakingInSliders) - }, - new SettingsCheckbox - { - LabelText = "Snaking out sliders", - Bindable = config.GetBindable(OsuSetting.SnakingOutSliders) - }, - }; - } - } -} diff --git a/osu.Game.Rulesets.Osu/UI/OsuSettingsSubsection.cs b/osu.Game.Rulesets.Osu/UI/OsuSettingsSubsection.cs index 9aa0f4101d..b4c873cf20 100644 --- a/osu.Game.Rulesets.Osu/UI/OsuSettingsSubsection.cs +++ b/osu.Game.Rulesets.Osu/UI/OsuSettingsSubsection.cs @@ -20,19 +20,19 @@ namespace osu.Game.Rulesets.Osu.UI [BackgroundDependencyLoader] private void load() { - var config = (OsuConfigManager)Config; + var config = (OsuRulesetConfigManager)Config; Children = new Drawable[] { new SettingsCheckbox { LabelText = "Snaking in sliders", - Bindable = config.GetBindable(OsuSetting.SnakingInSliders) + Bindable = config.GetBindable(OsuRulesetSetting.SnakingInSliders) }, new SettingsCheckbox { LabelText = "Snaking out sliders", - Bindable = config.GetBindable(OsuSetting.SnakingOutSliders) + Bindable = config.GetBindable(OsuRulesetSetting.SnakingOutSliders) }, }; } diff --git a/osu.Game/Configuration/GameConfigManager.cs b/osu.Game/Configuration/GameConfigManager.cs deleted file mode 100644 index b2f2a8e971..0000000000 --- a/osu.Game/Configuration/GameConfigManager.cs +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (c) 2007-2018 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Framework.Configuration; -using osu.Framework.Configuration.Tracking; -using osu.Framework.Extensions; -using osu.Framework.Platform; -using osu.Game.Overlays; -using osu.Game.Rulesets.Scoring; -using osu.Game.Screens.Select; - -namespace osu.Game.Configuration -{ - public class GameConfigManager : IniConfigManager - { - protected override void InitialiseDefaults() - { - // UI/selection defaults - Set(GameSetting.Ruleset, 0, 0, int.MaxValue); - Set(GameSetting.Skin, 0, 0, int.MaxValue); - - Set(GameSetting.BeatmapDetailTab, BeatmapDetailTab.Details); - - Set(GameSetting.ShowConvertedBeatmaps, true); - Set(GameSetting.DisplayStarsMinimum, 0.0, 0, 10, 0.1); - Set(GameSetting.DisplayStarsMaximum, 10.0, 0, 10, 0.1); - - Set(GameSetting.RandomSelectAlgorithm, RandomSelectAlgorithm.RandomPermutation); - - Set(GameSetting.ChatDisplayHeight, ChatOverlay.DEFAULT_HEIGHT, 0.2, 1); - - // Online settings - Set(GameSetting.Username, string.Empty); - Set(GameSetting.Token, string.Empty); - - Set(GameSetting.SavePassword, false).ValueChanged += val => - { - if (val) Set(GameSetting.SaveUsername, true); - }; - - Set(GameSetting.SaveUsername, true).ValueChanged += val => - { - if (!val) Set(GameSetting.SavePassword, false); - }; - - Set(GameSetting.ExternalLinkWarning, true); - - // Audio - Set(GameSetting.VolumeInactive, 0.25, 0, 1, 0.01); - - Set(GameSetting.MenuVoice, true); - Set(GameSetting.MenuMusic, true); - - Set(GameSetting.AudioOffset, 0, -500.0, 500.0, 1); - - // Input - Set(GameSetting.MenuCursorSize, 1.0, 0.5f, 2, 0.01); - Set(GameSetting.GameplayCursorSize, 1.0, 0.5f, 2, 0.01); - Set(GameSetting.AutoCursorSize, false); - - Set(GameSetting.MouseDisableButtons, false); - Set(GameSetting.MouseDisableWheel, false); - - // Graphics - Set(GameSetting.ShowFpsDisplay, false); - - Set(GameSetting.ShowStoryboard, true); - Set(GameSetting.BeatmapSkins, true); - Set(GameSetting.BeatmapHitsounds, true); - - Set(GameSetting.CursorRotation, true); - - Set(GameSetting.MenuParallax, true); - - // Gameplay - Set(GameSetting.DimLevel, 0.3, 0, 1, 0.01); - Set(GameSetting.BlurLevel, 0, 0, 1, 0.01); - - Set(GameSetting.ShowInterface, true); - Set(GameSetting.KeyOverlay, false); - - Set(GameSetting.FloatingComments, false); - - Set(GameSetting.ScoreDisplayMode, ScoringMode.Standardised); - - Set(GameSetting.IncreaseFirstObjectVisibility, true); - - // Update - Set(GameSetting.ReleaseStream, ReleaseStream.Lazer); - - Set(GameSetting.Version, string.Empty); - - Set(GameSetting.ScreenshotFormat, ScreenshotFormat.Jpg); - Set(GameSetting.ScreenshotCaptureMenuCursor, false); - - Set(GameSetting.SongSelectRightMouseScroll, false); - - Set(GameSetting.Scaling, ScalingMode.Off); - - Set(GameSetting.ScalingSizeX, 0.8f, 0.2f, 1f); - Set(GameSetting.ScalingSizeY, 0.8f, 0.2f, 1f); - - Set(GameSetting.ScalingPositionX, 0.5f, 0f, 1f); - Set(GameSetting.ScalingPositionY, 0.5f, 0f, 1f); - - Set(GameSetting.UIScale, 1f, 0.8f, 1.6f, 0.01f); - } - - public GameConfigManager(Storage storage) - : base(storage) - { - } - - public override TrackedSettings CreateTrackedSettings() => new TrackedSettings - { - new TrackedSetting(GameSetting.MouseDisableButtons, v => new SettingDescription(!v, "gameplay mouse buttons", v ? "disabled" : "enabled")), - new TrackedSetting(GameSetting.Scaling, m => new SettingDescription(m, "scaling", m.GetDescription())), - }; - } - - public enum GameSetting - { - Ruleset, - Token, - MenuCursorSize, - GameplayCursorSize, - AutoCursorSize, - DimLevel, - BlurLevel, - ShowStoryboard, - KeyOverlay, - FloatingComments, - ShowInterface, - MouseDisableButtons, - MouseDisableWheel, - AudioOffset, - VolumeInactive, - MenuMusic, - MenuVoice, - CursorRotation, - MenuParallax, - BeatmapDetailTab, - Username, - ReleaseStream, - SavePassword, - SaveUsername, - DisplayStarsMinimum, - DisplayStarsMaximum, - RandomSelectAlgorithm, - ShowFpsDisplay, - ChatDisplayHeight, - Version, - ShowConvertedBeatmaps, - Skin, - ScreenshotFormat, - ScreenshotCaptureMenuCursor, - SongSelectRightMouseScroll, - BeatmapSkins, - BeatmapHitsounds, - IncreaseFirstObjectVisibility, - ScoreDisplayMode, - ExternalLinkWarning, - Scaling, - ScalingPositionX, - ScalingPositionY, - ScalingSizeX, - ScalingSizeY, - UIScale - } -} diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index 1b279eee44..aed56d79bf 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -72,9 +72,6 @@ namespace osu.Game.Configuration Set(OsuSetting.MenuParallax, true); - Set(OsuSetting.SnakingInSliders, true); - Set(OsuSetting.SnakingOutSliders, true); - // Gameplay Set(OsuSetting.DimLevel, 0.3, 0, 1, 0.01); Set(OsuSetting.BlurLevel, 0, 0, 1, 0.01); @@ -150,8 +147,6 @@ namespace osu.Game.Configuration DisplayStarsMinimum, DisplayStarsMaximum, RandomSelectAlgorithm, - SnakingInSliders, - SnakingOutSliders, ShowFpsDisplay, ChatDisplayHeight, Version, diff --git a/osu.Game/Graphics/Containers/ParallaxContainer.cs b/osu.Game/Graphics/Containers/ParallaxContainer.cs index d5ac43bfe5..f7d30dc109 100644 --- a/osu.Game/Graphics/Containers/ParallaxContainer.cs +++ b/osu.Game/Graphics/Containers/ParallaxContainer.cs @@ -40,9 +40,9 @@ namespace osu.Game.Graphics.Containers protected override Container Content => content; [BackgroundDependencyLoader] - private void load(GameConfigManager config) + private void load(OsuConfigManager config) { - parallaxEnabled = config.GetBindable(GameSetting.MenuParallax); + parallaxEnabled = config.GetBindable(OsuSetting.MenuParallax); parallaxEnabled.ValueChanged += delegate { if (!parallaxEnabled) diff --git a/osu.Game/Graphics/Containers/ScalingContainer.cs b/osu.Game/Graphics/Containers/ScalingContainer.cs index 4abe42b99b..4973cb0608 100644 --- a/osu.Game/Graphics/Containers/ScalingContainer.cs +++ b/osu.Game/Graphics/Containers/ScalingContainer.cs @@ -65,11 +65,11 @@ namespace osu.Game.Graphics.Containers } [BackgroundDependencyLoader] - private void load(GameConfigManager gameConfig) + private void load(OsuConfigManager gameConfig) { if (applyUIScale) { - uiScale = gameConfig.GetBindable(GameSetting.UIScale); + uiScale = gameConfig.GetBindable(OsuSetting.UIScale); uiScale.BindValueChanged(scaleChanged, true); } } @@ -82,21 +82,21 @@ namespace osu.Game.Graphics.Containers } [BackgroundDependencyLoader] - private void load(GameConfigManager config) + private void load(OsuConfigManager config) { - scalingMode = config.GetBindable(GameSetting.Scaling); + scalingMode = config.GetBindable(OsuSetting.Scaling); scalingMode.ValueChanged += _ => updateSize(); - sizeX = config.GetBindable(GameSetting.ScalingSizeX); + sizeX = config.GetBindable(OsuSetting.ScalingSizeX); sizeX.ValueChanged += _ => updateSize(); - sizeY = config.GetBindable(GameSetting.ScalingSizeY); + sizeY = config.GetBindable(OsuSetting.ScalingSizeY); sizeY.ValueChanged += _ => updateSize(); - posX = config.GetBindable(GameSetting.ScalingPositionX); + posX = config.GetBindable(OsuSetting.ScalingPositionX); posX.ValueChanged += _ => updateSize(); - posY = config.GetBindable(GameSetting.ScalingPositionY); + posY = config.GetBindable(OsuSetting.ScalingPositionY); posY.ValueChanged += _ => updateSize(); } diff --git a/osu.Game/Graphics/Cursor/MenuCursor.cs b/osu.Game/Graphics/Cursor/MenuCursor.cs index d32d06a0fe..76c2345cd5 100644 --- a/osu.Game/Graphics/Cursor/MenuCursor.cs +++ b/osu.Game/Graphics/Cursor/MenuCursor.cs @@ -31,9 +31,9 @@ namespace osu.Game.Graphics.Cursor private Vector2 positionMouseDown; [BackgroundDependencyLoader(true)] - private void load([NotNull] GameConfigManager config, [CanBeNull] ScreenshotManager screenshotManager) + private void load([NotNull] OsuConfigManager config, [CanBeNull] ScreenshotManager screenshotManager) { - cursorRotate = config.GetBindable(GameSetting.CursorRotation); + cursorRotate = config.GetBindable(OsuSetting.CursorRotation); if (screenshotManager != null) screenshotCursorVisibility.BindTo(screenshotManager.CursorVisibility); @@ -131,7 +131,7 @@ namespace osu.Game.Graphics.Cursor } [BackgroundDependencyLoader] - private void load(GameConfigManager config, TextureStore textures, OsuColour colour) + private void load(OsuConfigManager config, TextureStore textures, OsuColour colour) { Children = new Drawable[] { @@ -155,7 +155,7 @@ namespace osu.Game.Graphics.Cursor } }; - cursorScale = config.GetBindable(GameSetting.MenuCursorSize); + cursorScale = config.GetBindable(OsuSetting.MenuCursorSize); cursorScale.ValueChanged += newScale => cursorContainer.Scale = new Vector2((float)newScale * base_scale); cursorScale.TriggerChange(); } diff --git a/osu.Game/Graphics/ScreenshotManager.cs b/osu.Game/Graphics/ScreenshotManager.cs index ce8ee4fff6..ef4209f6f3 100644 --- a/osu.Game/Graphics/ScreenshotManager.cs +++ b/osu.Game/Graphics/ScreenshotManager.cs @@ -42,14 +42,14 @@ namespace osu.Game.Graphics private SampleChannel shutter; [BackgroundDependencyLoader] - private void load(GameHost host, GameConfigManager config, Storage storage, NotificationOverlay notificationOverlay, AudioManager audio) + private void load(GameHost host, OsuConfigManager config, Storage storage, NotificationOverlay notificationOverlay, AudioManager audio) { this.host = host; this.storage = storage.GetStorageForDirectory(@"screenshots"); this.notificationOverlay = notificationOverlay; - screenshotFormat = config.GetBindable(GameSetting.ScreenshotFormat); - captureMenuCursor = config.GetBindable(GameSetting.ScreenshotCaptureMenuCursor); + screenshotFormat = config.GetBindable(OsuSetting.ScreenshotFormat); + captureMenuCursor = config.GetBindable(OsuSetting.ScreenshotCaptureMenuCursor); shutter = audio.Sample.Get("UI/shutter"); } diff --git a/osu.Game/Online/API/APIAccess.cs b/osu.Game/Online/API/APIAccess.cs index 74dcacc5a5..9f5eb1441c 100644 --- a/osu.Game/Online/API/APIAccess.cs +++ b/osu.Game/Online/API/APIAccess.cs @@ -19,7 +19,7 @@ namespace osu.Game.Online.API { public class APIAccess : Component, IAPIProvider { - private readonly GameConfigManager config; + private readonly OsuConfigManager config; private readonly OAuth authentication; public string Endpoint = @"https://osu.ppy.sh"; @@ -43,16 +43,16 @@ namespace osu.Game.Online.API private readonly Logger log; - public APIAccess(GameConfigManager config) + public APIAccess(OsuConfigManager config) { this.config = config; authentication = new OAuth(client_id, client_secret, Endpoint); log = Logger.GetLogger(LoggingTarget.Network); - ProvidedUsername = config.Get(GameSetting.Username); + ProvidedUsername = config.Get(OsuSetting.Username); - authentication.TokenString = config.Get(GameSetting.Token); + authentication.TokenString = config.Get(OsuSetting.Token); authentication.Token.ValueChanged += onTokenChanged; var thread = new Thread(run) @@ -64,7 +64,7 @@ namespace osu.Game.Online.API thread.Start(); } - private void onTokenChanged(OAuthToken token) => config.Set(GameSetting.Token, config.Get(GameSetting.SavePassword) ? authentication.TokenString : string.Empty); + private void onTokenChanged(OAuthToken token) => config.Set(OsuSetting.Token, config.Get(OsuSetting.SavePassword) ? authentication.TokenString : string.Empty); private readonly List components = new List(); @@ -124,7 +124,7 @@ namespace osu.Game.Online.API State = APIState.Connecting; // save the username at this point, if the user requested for it to be. - config.Set(GameSetting.Username, config.Get(GameSetting.SaveUsername) ? ProvidedUsername : string.Empty); + config.Set(OsuSetting.Username, config.Get(OsuSetting.SaveUsername) ? ProvidedUsername : string.Empty); if (!authentication.HasValidAccessToken && !authentication.AuthenticateWithLogin(ProvidedUsername, password)) { diff --git a/osu.Game/Online/Chat/ExternalLinkOpener.cs b/osu.Game/Online/Chat/ExternalLinkOpener.cs index b82e8d9bd4..a2c5a3cf8c 100644 --- a/osu.Game/Online/Chat/ExternalLinkOpener.cs +++ b/osu.Game/Online/Chat/ExternalLinkOpener.cs @@ -18,11 +18,11 @@ namespace osu.Game.Online.Chat private Bindable externalLinkWarning; [BackgroundDependencyLoader(true)] - private void load(GameHost host, DialogOverlay dialogOverlay, GameConfigManager config) + private void load(GameHost host, DialogOverlay dialogOverlay, OsuConfigManager config) { this.host = host; this.dialogOverlay = dialogOverlay; - externalLinkWarning = config.GetBindable(GameSetting.ExternalLinkWarning); + externalLinkWarning = config.GetBindable(OsuSetting.ExternalLinkWarning); } public void OpenUrlExternally(string url) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index b9f7013db1..771dacfed3 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -174,17 +174,17 @@ namespace osu.Game dependencies.CacheAs>(ruleset); // bind config int to database RulesetInfo - configRuleset = LocalConfig.GetBindable(GameSetting.Ruleset); + configRuleset = LocalConfig.GetBindable(OsuSetting.Ruleset); ruleset.Value = RulesetStore.GetRuleset(configRuleset.Value) ?? RulesetStore.AvailableRulesets.First(); ruleset.ValueChanged += r => configRuleset.Value = r.ID ?? 0; // bind config int to database SkinInfo - configSkin = LocalConfig.GetBindable(GameSetting.Skin); + configSkin = LocalConfig.GetBindable(OsuSetting.Skin); SkinManager.CurrentSkinInfo.ValueChanged += s => configSkin.Value = s.ID; configSkin.ValueChanged += id => SkinManager.CurrentSkinInfo.Value = SkinManager.Query(s => s.ID == id) ?? SkinInfo.Default; configSkin.TriggerChange(); - LocalConfig.BindWith(GameSetting.VolumeInactive, inactiveVolumeAdjust); + LocalConfig.BindWith(OsuSetting.VolumeInactive, inactiveVolumeAdjust); } private ExternalLinkOpener externalLinkOpener; @@ -631,7 +631,7 @@ namespace osu.Game direct.ToggleVisibility(); return true; case GlobalAction.ToggleGameplayMouseButtons: - LocalConfig.Set(GameSetting.MouseDisableButtons, !LocalConfig.Get(GameSetting.MouseDisableButtons)); + LocalConfig.Set(OsuSetting.MouseDisableButtons, !LocalConfig.Get(OsuSetting.MouseDisableButtons)); return true; } diff --git a/osu.Game/OsuGameBase.cs b/osu.Game/OsuGameBase.cs index 17bba66b3f..963d902dc8 100644 --- a/osu.Game/OsuGameBase.cs +++ b/osu.Game/OsuGameBase.cs @@ -43,7 +43,7 @@ namespace osu.Game /// public class OsuGameBase : Framework.Game, ICanAcceptFiles { - protected GameConfigManager LocalConfig; + protected OsuConfigManager LocalConfig; protected BeatmapManager BeatmapManager; @@ -206,7 +206,7 @@ namespace osu.Game // TODO: This is temporary until we reimplement the local FPS display. // It's just to allow end-users to access the framework FPS display without knowing the shortcut key. - fpsDisplayVisible = LocalConfig.GetBindable(GameSetting.ShowFpsDisplay); + fpsDisplayVisible = LocalConfig.GetBindable(OsuSetting.ShowFpsDisplay); fpsDisplayVisible.ValueChanged += val => { FrameStatisticsMode = val ? FrameStatisticsMode.Minimal : FrameStatisticsMode.None; }; fpsDisplayVisible.TriggerChange(); } @@ -237,7 +237,7 @@ namespace osu.Game public override void SetHost(GameHost host) { if (LocalConfig == null) - LocalConfig = new GameConfigManager(host.Storage); + LocalConfig = new OsuConfigManager(host.Storage); base.SetHost(host); } diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index 995733ab09..74edf48433 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -325,9 +325,9 @@ namespace osu.Game.Overlays } [BackgroundDependencyLoader] - private void load(GameConfigManager config, OsuColour colours, ChannelManager channelManager) + private void load(OsuConfigManager config, OsuColour colours, ChannelManager channelManager) { - ChatHeight = config.GetBindable(GameSetting.ChatDisplayHeight); + ChatHeight = config.GetBindable(OsuSetting.ChatDisplayHeight); ChatHeight.ValueChanged += h => { chatContainer.Height = (float)h; diff --git a/osu.Game/Overlays/OnScreenDisplay.cs b/osu.Game/Overlays/OnScreenDisplay.cs index 0a7c869968..becf70b03b 100644 --- a/osu.Game/Overlays/OnScreenDisplay.cs +++ b/osu.Game/Overlays/OnScreenDisplay.cs @@ -117,7 +117,7 @@ namespace osu.Game.Overlays } [BackgroundDependencyLoader] - private void load(FrameworkConfigManager frameworkConfig, GameConfigManager gameConfig) + private void load(FrameworkConfigManager frameworkConfig, OsuConfigManager gameConfig) { BeginTracking(this, frameworkConfig); BeginTracking(this, gameConfig); diff --git a/osu.Game/Overlays/Settings/Sections/Audio/MainMenuSettings.cs b/osu.Game/Overlays/Settings/Sections/Audio/MainMenuSettings.cs index 2999824df0..4e43caff23 100644 --- a/osu.Game/Overlays/Settings/Sections/Audio/MainMenuSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Audio/MainMenuSettings.cs @@ -11,19 +11,19 @@ namespace osu.Game.Overlays.Settings.Sections.Audio protected override string Header => "Main Menu"; [BackgroundDependencyLoader] - private void load(GameConfigManager config) + private void load(OsuConfigManager config) { Children = new[] { new SettingsCheckbox { LabelText = "Interface voices", - Bindable = config.GetBindable(GameSetting.MenuVoice) + Bindable = config.GetBindable(OsuSetting.MenuVoice) }, new SettingsCheckbox { LabelText = "osu! music theme", - Bindable = config.GetBindable(GameSetting.MenuMusic) + Bindable = config.GetBindable(OsuSetting.MenuMusic) }, }; } diff --git a/osu.Game/Overlays/Settings/Sections/Audio/OffsetSettings.cs b/osu.Game/Overlays/Settings/Sections/Audio/OffsetSettings.cs index 514fcac5e4..aaa4302553 100644 --- a/osu.Game/Overlays/Settings/Sections/Audio/OffsetSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Audio/OffsetSettings.cs @@ -13,14 +13,14 @@ namespace osu.Game.Overlays.Settings.Sections.Audio protected override string Header => "Offset Adjustment"; [BackgroundDependencyLoader] - private void load(GameConfigManager config) + private void load(OsuConfigManager config) { Children = new Drawable[] { new SettingsSlider { LabelText = "Audio offset", - Bindable = config.GetBindable(GameSetting.AudioOffset), + Bindable = config.GetBindable(OsuSetting.AudioOffset), KeyboardStep = 1f }, new SettingsButton diff --git a/osu.Game/Overlays/Settings/Sections/Audio/VolumeSettings.cs b/osu.Game/Overlays/Settings/Sections/Audio/VolumeSettings.cs index 9ad6e6ddf8..0124f7090e 100644 --- a/osu.Game/Overlays/Settings/Sections/Audio/VolumeSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Audio/VolumeSettings.cs @@ -13,12 +13,12 @@ namespace osu.Game.Overlays.Settings.Sections.Audio protected override string Header => "Volume"; [BackgroundDependencyLoader] - private void load(AudioManager audio, GameConfigManager config) + private void load(AudioManager audio, OsuConfigManager config) { Children = new Drawable[] { new SettingsSlider { LabelText = "Master", Bindable = audio.Volume, KeyboardStep = 0.01f }, - new SettingsSlider { LabelText = "Master (window inactive)", Bindable = config.GetBindable(GameSetting.VolumeInactive), KeyboardStep = 0.01f }, + new SettingsSlider { LabelText = "Master (window inactive)", Bindable = config.GetBindable(OsuSetting.VolumeInactive), KeyboardStep = 0.01f }, new SettingsSlider { LabelText = "Effect", Bindable = audio.VolumeSample, KeyboardStep = 0.01f }, new SettingsSlider { LabelText = "Music", Bindable = audio.VolumeTrack, KeyboardStep = 0.01f }, }; diff --git a/osu.Game/Overlays/Settings/Sections/Gameplay/GeneralSettings.cs b/osu.Game/Overlays/Settings/Sections/Gameplay/GeneralSettings.cs index 15a854b0a8..997d1354b3 100644 --- a/osu.Game/Overlays/Settings/Sections/Gameplay/GeneralSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Gameplay/GeneralSettings.cs @@ -13,36 +13,36 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay protected override string Header => "General"; [BackgroundDependencyLoader] - private void load(GameConfigManager config) + private void load(OsuConfigManager config) { Children = new Drawable[] { new SettingsSlider { LabelText = "Background dim", - Bindable = config.GetBindable(GameSetting.DimLevel), + Bindable = config.GetBindable(OsuSetting.DimLevel), KeyboardStep = 0.01f }, new SettingsSlider { LabelText = "Background blur", - Bindable = config.GetBindable(GameSetting.BlurLevel), + Bindable = config.GetBindable(OsuSetting.BlurLevel), KeyboardStep = 0.01f }, new SettingsCheckbox { LabelText = "Show score overlay", - Bindable = config.GetBindable(GameSetting.ShowInterface) + Bindable = config.GetBindable(OsuSetting.ShowInterface) }, new SettingsCheckbox { LabelText = "Always show key overlay", - Bindable = config.GetBindable(GameSetting.KeyOverlay) + Bindable = config.GetBindable(OsuSetting.KeyOverlay) }, new SettingsEnumDropdown { LabelText = "Score display mode", - Bindable = config.GetBindable(GameSetting.ScoreDisplayMode) + Bindable = config.GetBindable(OsuSetting.ScoreDisplayMode) } }; } diff --git a/osu.Game/Overlays/Settings/Sections/Gameplay/ModsSettings.cs b/osu.Game/Overlays/Settings/Sections/Gameplay/ModsSettings.cs index 20912da72c..2cf14f5aff 100644 --- a/osu.Game/Overlays/Settings/Sections/Gameplay/ModsSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Gameplay/ModsSettings.cs @@ -11,14 +11,14 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay protected override string Header => "Mods"; [BackgroundDependencyLoader] - private void load(GameConfigManager config) + private void load(OsuConfigManager config) { Children = new[] { new SettingsCheckbox { LabelText = "Increase visibility of first object with \"Hidden\" mod", - Bindable = config.GetBindable(GameSetting.IncreaseFirstObjectVisibility) + Bindable = config.GetBindable(OsuSetting.IncreaseFirstObjectVisibility) }, }; } diff --git a/osu.Game/Overlays/Settings/Sections/Gameplay/SongSelectSettings.cs b/osu.Game/Overlays/Settings/Sections/Gameplay/SongSelectSettings.cs index db767ac933..3e2272dba6 100644 --- a/osu.Game/Overlays/Settings/Sections/Gameplay/SongSelectSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Gameplay/SongSelectSettings.cs @@ -13,36 +13,36 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay protected override string Header => "Song Select"; [BackgroundDependencyLoader] - private void load(GameConfigManager config) + private void load(OsuConfigManager config) { Children = new Drawable[] { new SettingsCheckbox { LabelText = "Right mouse drag to absolute scroll", - Bindable = config.GetBindable(GameSetting.SongSelectRightMouseScroll), + Bindable = config.GetBindable(OsuSetting.SongSelectRightMouseScroll), }, new SettingsCheckbox { LabelText = "Show converted beatmaps", - Bindable = config.GetBindable(GameSetting.ShowConvertedBeatmaps), + Bindable = config.GetBindable(OsuSetting.ShowConvertedBeatmaps), }, new SettingsSlider { LabelText = "Display beatmaps from", - Bindable = config.GetBindable(GameSetting.DisplayStarsMinimum), + Bindable = config.GetBindable(OsuSetting.DisplayStarsMinimum), KeyboardStep = 0.1f }, new SettingsSlider { LabelText = "up to", - Bindable = config.GetBindable(GameSetting.DisplayStarsMaximum), + Bindable = config.GetBindable(OsuSetting.DisplayStarsMaximum), KeyboardStep = 0.1f }, new SettingsEnumDropdown { LabelText = "Random selection algorithm", - Bindable = config.GetBindable(GameSetting.RandomSelectAlgorithm), + Bindable = config.GetBindable(OsuSetting.RandomSelectAlgorithm), } }; } diff --git a/osu.Game/Overlays/Settings/Sections/General/LoginSettings.cs b/osu.Game/Overlays/Settings/Sections/General/LoginSettings.cs index 23d0dcbe38..4fad999577 100644 --- a/osu.Game/Overlays/Settings/Sections/General/LoginSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/General/LoginSettings.cs @@ -206,7 +206,7 @@ namespace osu.Game.Overlays.Settings.Sections.General } [BackgroundDependencyLoader(permitNulls: true)] - private void load(APIAccess api, GameConfigManager config, AccountCreationOverlay accountCreation) + private void load(APIAccess api, OsuConfigManager config, AccountCreationOverlay accountCreation) { this.api = api; Direction = FillDirection.Vertical; @@ -232,12 +232,12 @@ namespace osu.Game.Overlays.Settings.Sections.General new SettingsCheckbox { LabelText = "Remember email address", - Bindable = config.GetBindable(GameSetting.SaveUsername), + Bindable = config.GetBindable(OsuSetting.SaveUsername), }, new SettingsCheckbox { LabelText = "Stay signed in", - Bindable = config.GetBindable(GameSetting.SavePassword), + Bindable = config.GetBindable(OsuSetting.SavePassword), }, new SettingsButton { diff --git a/osu.Game/Overlays/Settings/Sections/General/UpdateSettings.cs b/osu.Game/Overlays/Settings/Sections/General/UpdateSettings.cs index e94d94dd36..4d889856f6 100644 --- a/osu.Game/Overlays/Settings/Sections/General/UpdateSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/General/UpdateSettings.cs @@ -13,14 +13,14 @@ namespace osu.Game.Overlays.Settings.Sections.General protected override string Header => "Updates"; [BackgroundDependencyLoader] - private void load(Storage storage, GameConfigManager config) + private void load(Storage storage, OsuConfigManager config) { Children = new Drawable[] { new SettingsEnumDropdown { LabelText = "Release stream", - Bindable = config.GetBindable(GameSetting.ReleaseStream), + Bindable = config.GetBindable(OsuSetting.ReleaseStream), }, new SettingsButton { diff --git a/osu.Game/Overlays/Settings/Sections/Graphics/DetailSettings.cs b/osu.Game/Overlays/Settings/Sections/Graphics/DetailSettings.cs index 3917def00b..01cdc9aa32 100644 --- a/osu.Game/Overlays/Settings/Sections/Graphics/DetailSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Graphics/DetailSettings.cs @@ -12,29 +12,29 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics protected override string Header => "Detail Settings"; [BackgroundDependencyLoader] - private void load(GameConfigManager config) + private void load(OsuConfigManager config) { Children = new Drawable[] { new SettingsCheckbox { LabelText = "Storyboards", - Bindable = config.GetBindable(GameSetting.ShowStoryboard) + Bindable = config.GetBindable(OsuSetting.ShowStoryboard) }, new SettingsCheckbox { LabelText = "Rotate cursor when dragging", - Bindable = config.GetBindable(GameSetting.CursorRotation) + Bindable = config.GetBindable(OsuSetting.CursorRotation) }, new SettingsEnumDropdown { LabelText = "Screenshot format", - Bindable = config.GetBindable(GameSetting.ScreenshotFormat) + Bindable = config.GetBindable(OsuSetting.ScreenshotFormat) }, new SettingsCheckbox { LabelText = "Show menu cursor in screenshots", - Bindable = config.GetBindable(GameSetting.ScreenshotCaptureMenuCursor) + Bindable = config.GetBindable(OsuSetting.ScreenshotCaptureMenuCursor) } }; } diff --git a/osu.Game/Overlays/Settings/Sections/Graphics/LayoutSettings.cs b/osu.Game/Overlays/Settings/Sections/Graphics/LayoutSettings.cs index 768335b127..43309990a1 100644 --- a/osu.Game/Overlays/Settings/Sections/Graphics/LayoutSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Graphics/LayoutSettings.cs @@ -38,16 +38,16 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics private const int transition_duration = 400; [BackgroundDependencyLoader] - private void load(FrameworkConfigManager config, GameConfigManager gameConfig, OsuGameBase game) + private void load(FrameworkConfigManager config, OsuConfigManager gameConfig, OsuGameBase game) { this.game = game; - scalingMode = gameConfig.GetBindable(GameSetting.Scaling); + scalingMode = gameConfig.GetBindable(OsuSetting.Scaling); sizeFullscreen = config.GetBindable(FrameworkSetting.SizeFullscreen); - scalingSizeX = gameConfig.GetBindable(GameSetting.ScalingSizeX); - scalingSizeY = gameConfig.GetBindable(GameSetting.ScalingSizeY); - scalingPositionX = gameConfig.GetBindable(GameSetting.ScalingPositionX); - scalingPositionY = gameConfig.GetBindable(GameSetting.ScalingPositionY); + scalingSizeX = gameConfig.GetBindable(OsuSetting.ScalingSizeX); + scalingSizeY = gameConfig.GetBindable(OsuSetting.ScalingSizeY); + scalingPositionX = gameConfig.GetBindable(OsuSetting.ScalingPositionX); + scalingPositionY = gameConfig.GetBindable(OsuSetting.ScalingPositionY); Container resolutionSettingsContainer; @@ -67,13 +67,13 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics { LabelText = "UI Scaling", TransferValueOnCommit = true, - Bindable = gameConfig.GetBindable(GameSetting.UIScale), + Bindable = gameConfig.GetBindable(OsuSetting.UIScale), KeyboardStep = 0.01f }, new SettingsEnumDropdown { LabelText = "Screen Scaling", - Bindable = gameConfig.GetBindable(GameSetting.Scaling), + Bindable = gameConfig.GetBindable(OsuSetting.Scaling), }, scalingSettings = new FillFlowContainer> { diff --git a/osu.Game/Overlays/Settings/Sections/Graphics/MainMenuSettings.cs b/osu.Game/Overlays/Settings/Sections/Graphics/MainMenuSettings.cs index ab50aabe69..92f64d0e14 100644 --- a/osu.Game/Overlays/Settings/Sections/Graphics/MainMenuSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Graphics/MainMenuSettings.cs @@ -11,14 +11,14 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics protected override string Header => "User Interface"; [BackgroundDependencyLoader] - private void load(GameConfigManager config) + private void load(OsuConfigManager config) { Children = new[] { new SettingsCheckbox { LabelText = "Parallax", - Bindable = config.GetBindable(GameSetting.MenuParallax) + Bindable = config.GetBindable(OsuSetting.MenuParallax) }, }; } diff --git a/osu.Game/Overlays/Settings/Sections/Graphics/RendererSettings.cs b/osu.Game/Overlays/Settings/Sections/Graphics/RendererSettings.cs index 599f711f92..e988179a5e 100644 --- a/osu.Game/Overlays/Settings/Sections/Graphics/RendererSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Graphics/RendererSettings.cs @@ -13,7 +13,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics protected override string Header => "Renderer"; [BackgroundDependencyLoader] - private void load(FrameworkConfigManager config, GameConfigManager gameConfig) + private void load(FrameworkConfigManager config, OsuConfigManager gameConfig) { // NOTE: Compatability mode omitted Children = new Drawable[] @@ -27,7 +27,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics new SettingsCheckbox { LabelText = "Show FPS", - Bindable = gameConfig.GetBindable(GameSetting.ShowFpsDisplay) + Bindable = gameConfig.GetBindable(OsuSetting.ShowFpsDisplay) }, }; } diff --git a/osu.Game/Overlays/Settings/Sections/Input/MouseSettings.cs b/osu.Game/Overlays/Settings/Sections/Input/MouseSettings.cs index 8c6d4a8591..12c93a8605 100644 --- a/osu.Game/Overlays/Settings/Sections/Input/MouseSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Input/MouseSettings.cs @@ -19,7 +19,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input private SensitivitySetting sensitivity; [BackgroundDependencyLoader] - private void load(GameConfigManager gameConfig, FrameworkConfigManager config) + private void load(OsuConfigManager gameConfig, FrameworkConfigManager config) { Children = new Drawable[] { @@ -46,12 +46,12 @@ namespace osu.Game.Overlays.Settings.Sections.Input new SettingsCheckbox { LabelText = "Disable mouse wheel during gameplay", - Bindable = gameConfig.GetBindable(GameSetting.MouseDisableWheel) + Bindable = gameConfig.GetBindable(OsuSetting.MouseDisableWheel) }, new SettingsCheckbox { LabelText = "Disable mouse buttons during gameplay", - Bindable = gameConfig.GetBindable(GameSetting.MouseDisableButtons) + Bindable = gameConfig.GetBindable(OsuSetting.MouseDisableButtons) }, }; diff --git a/osu.Game/Overlays/Settings/Sections/Online/WebSettings.cs b/osu.Game/Overlays/Settings/Sections/Online/WebSettings.cs index 5d633ade1b..a8b3e45a83 100644 --- a/osu.Game/Overlays/Settings/Sections/Online/WebSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Online/WebSettings.cs @@ -12,14 +12,14 @@ namespace osu.Game.Overlays.Settings.Sections.Online protected override string Header => "Web"; [BackgroundDependencyLoader] - private void load(GameConfigManager config) + private void load(OsuConfigManager config) { Children = new Drawable[] { new SettingsCheckbox { LabelText = "Warn about opening external links", - Bindable = config.GetBindable(GameSetting.ExternalLinkWarning) + Bindable = config.GetBindable(OsuSetting.ExternalLinkWarning) }, }; } diff --git a/osu.Game/Overlays/Settings/Sections/SkinSection.cs b/osu.Game/Overlays/Settings/Sections/SkinSection.cs index ed8eb1e003..7361d671de 100644 --- a/osu.Game/Overlays/Settings/Sections/SkinSection.cs +++ b/osu.Game/Overlays/Settings/Sections/SkinSection.cs @@ -27,7 +27,7 @@ namespace osu.Game.Overlays.Settings.Sections private SkinManager skins; [BackgroundDependencyLoader] - private void load(GameConfigManager config, SkinManager skins) + private void load(OsuConfigManager config, SkinManager skins) { this.skins = skins; @@ -38,41 +38,41 @@ namespace osu.Game.Overlays.Settings.Sections new SettingsSlider { LabelText = "Menu cursor size", - Bindable = config.GetBindable(GameSetting.MenuCursorSize), + Bindable = config.GetBindable(OsuSetting.MenuCursorSize), KeyboardStep = 0.01f }, new SettingsSlider { LabelText = "Gameplay cursor size", - Bindable = config.GetBindable(GameSetting.GameplayCursorSize), + Bindable = config.GetBindable(OsuSetting.GameplayCursorSize), KeyboardStep = 0.01f }, new SettingsCheckbox { LabelText = "Adjust gameplay cursor size based on current beatmap", - Bindable = config.GetBindable(GameSetting.AutoCursorSize) + Bindable = config.GetBindable(OsuSetting.AutoCursorSize) }, new SettingsCheckbox { LabelText = "Beatmap skins", - Bindable = config.GetBindable(GameSetting.BeatmapSkins) + Bindable = config.GetBindable(OsuSetting.BeatmapSkins) }, new SettingsCheckbox { LabelText = "Beatmap hitsounds", - Bindable = config.GetBindable(GameSetting.BeatmapHitsounds) + Bindable = config.GetBindable(OsuSetting.BeatmapHitsounds) }, }; skins.ItemAdded += itemAdded; skins.ItemRemoved += itemRemoved; - config.BindWith(GameSetting.Skin, configBindable); + config.BindWith(OsuSetting.Skin, configBindable); skinDropdown.Bindable = dropdownBindable; skinDropdown.Items = skins.GetAllUsableSkins().ToArray(); - // Todo: This should not be necessary when GameConfigManager is databased + // Todo: This should not be necessary when OsuConfigManager is databased if (skinDropdown.Items.All(s => s.ID != configBindable.Value)) configBindable.Value = 0; diff --git a/osu.Game/Rulesets/Mods/IReadFromConfig.cs b/osu.Game/Rulesets/Mods/IReadFromConfig.cs index da8cf43407..d66fabce70 100644 --- a/osu.Game/Rulesets/Mods/IReadFromConfig.cs +++ b/osu.Game/Rulesets/Mods/IReadFromConfig.cs @@ -10,6 +10,6 @@ namespace osu.Game.Rulesets.Mods /// public interface IReadFromConfig { - void ReadFromConfig(GameConfigManager config); + void ReadFromConfig(OsuConfigManager config); } } diff --git a/osu.Game/Rulesets/Mods/ModHidden.cs b/osu.Game/Rulesets/Mods/ModHidden.cs index c8c9347bbd..465ead450c 100644 --- a/osu.Game/Rulesets/Mods/ModHidden.cs +++ b/osu.Game/Rulesets/Mods/ModHidden.cs @@ -20,9 +20,9 @@ namespace osu.Game.Rulesets.Mods protected Bindable IncreaseFirstObjectVisibility = new Bindable(); - public void ReadFromConfig(GameConfigManager config) + public void ReadFromConfig(OsuConfigManager config) { - IncreaseFirstObjectVisibility = config.GetBindable(GameSetting.IncreaseFirstObjectVisibility); + IncreaseFirstObjectVisibility = config.GetBindable(OsuSetting.IncreaseFirstObjectVisibility); } public virtual void ApplyToDrawableHitObjects(IEnumerable drawables) diff --git a/osu.Game/Rulesets/UI/RulesetContainer.cs b/osu.Game/Rulesets/UI/RulesetContainer.cs index a63947cd5f..0d020238aa 100644 --- a/osu.Game/Rulesets/UI/RulesetContainer.cs +++ b/osu.Game/Rulesets/UI/RulesetContainer.cs @@ -248,7 +248,7 @@ namespace osu.Game.Rulesets.UI } [BackgroundDependencyLoader] - private void load(GameConfigManager config) + private void load(OsuConfigManager config) { KeyBindingInputManager.AddRange(new Drawable[] { @@ -291,7 +291,7 @@ namespace osu.Game.Rulesets.UI /// Applies the active mods to this RulesetContainer. /// /// - private void applyRulesetMods(IEnumerable mods, GameConfigManager config) + private void applyRulesetMods(IEnumerable mods, OsuConfigManager config) { if (mods == null) return; diff --git a/osu.Game/Rulesets/UI/RulesetInputManager.cs b/osu.Game/Rulesets/UI/RulesetInputManager.cs index f3c0699377..274a9475db 100644 --- a/osu.Game/Rulesets/UI/RulesetInputManager.cs +++ b/osu.Game/Rulesets/UI/RulesetInputManager.cs @@ -193,9 +193,9 @@ namespace osu.Game.Rulesets.UI private Bindable mouseDisabled; [BackgroundDependencyLoader] - private void load(GameConfigManager config) + private void load(OsuConfigManager config) { - mouseDisabled = config.GetBindable(GameSetting.MouseDisableButtons); + mouseDisabled = config.GetBindable(OsuSetting.MouseDisableButtons); } protected override bool Handle(UIEvent e) diff --git a/osu.Game/Screens/Menu/Intro.cs b/osu.Game/Screens/Menu/Intro.cs index 18505fc6dc..93a84ec14d 100644 --- a/osu.Game/Screens/Menu/Intro.cs +++ b/osu.Game/Screens/Menu/Intro.cs @@ -47,12 +47,12 @@ namespace osu.Game.Screens.Menu private WorkingBeatmap introBeatmap; [BackgroundDependencyLoader] - private void load(AudioManager audio, GameConfigManager config, BeatmapManager beatmaps, Framework.Game game, BindableBeatmap beatmap) + private void load(AudioManager audio, OsuConfigManager config, BeatmapManager beatmaps, Framework.Game game, BindableBeatmap beatmap) { this.beatmap.BindTo(beatmap); - menuVoice = config.GetBindable(GameSetting.MenuVoice); - menuMusic = config.GetBindable(GameSetting.MenuMusic); + menuVoice = config.GetBindable(OsuSetting.MenuVoice); + menuMusic = config.GetBindable(OsuSetting.MenuMusic); BeatmapSetInfo setInfo = null; diff --git a/osu.Game/Screens/Play/HUDOverlay.cs b/osu.Game/Screens/Play/HUDOverlay.cs index 32bc1390ed..1b1862d587 100644 --- a/osu.Game/Screens/Play/HUDOverlay.cs +++ b/osu.Game/Screens/Play/HUDOverlay.cs @@ -101,9 +101,9 @@ namespace osu.Game.Screens.Play } [BackgroundDependencyLoader(true)] - private void load(GameConfigManager config, NotificationOverlay notificationOverlay) + private void load(OsuConfigManager config, NotificationOverlay notificationOverlay) { - showHud = config.GetBindable(GameSetting.ShowInterface); + showHud = config.GetBindable(OsuSetting.ShowInterface); showHud.ValueChanged += hudVisibility => visibilityContainer.FadeTo(hudVisibility ? 1 : 0, duration); showHud.TriggerChange(); diff --git a/osu.Game/Screens/Play/KeyCounterCollection.cs b/osu.Game/Screens/Play/KeyCounterCollection.cs index 992e3c30b1..f033a20226 100644 --- a/osu.Game/Screens/Play/KeyCounterCollection.cs +++ b/osu.Game/Screens/Play/KeyCounterCollection.cs @@ -49,9 +49,9 @@ namespace osu.Game.Screens.Play } [BackgroundDependencyLoader] - private void load(GameConfigManager config) + private void load(OsuConfigManager config) { - config.BindWith(GameSetting.KeyOverlay, configVisibility); + config.BindWith(OsuSetting.KeyOverlay, configVisibility); Visible.BindValueChanged(_ => updateVisibility()); configVisibility.BindValueChanged(_ => updateVisibility(), true); diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 099dab7949..54644b8d9c 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -92,7 +92,7 @@ namespace osu.Game.Screens.Play public bool LoadedBeatmapSuccessfully => RulesetContainer?.Objects.Any() == true; [BackgroundDependencyLoader] - private void load(AudioManager audio, APIAccess api, GameConfigManager config) + private void load(AudioManager audio, APIAccess api, OsuConfigManager config) { this.api = api; @@ -102,8 +102,8 @@ namespace osu.Game.Screens.Play sampleRestart = audio.Sample.Get(@"Gameplay/restart"); - mouseWheelDisabled = config.GetBindable(GameSetting.MouseDisableWheel); - userAudioOffset = config.GetBindable(GameSetting.AudioOffset); + mouseWheelDisabled = config.GetBindable(OsuSetting.MouseDisableWheel); + userAudioOffset = config.GetBindable(OsuSetting.AudioOffset); IBeatmap beatmap; @@ -164,7 +164,7 @@ namespace osu.Game.Screens.Play ScoreProcessor = RulesetContainer.CreateScoreProcessor(); if (!ScoreProcessor.Mode.Disabled) - config.BindWith(GameSetting.ScoreDisplayMode, ScoreProcessor.Mode); + config.BindWith(OsuSetting.ScoreDisplayMode, ScoreProcessor.Mode); Children = new Drawable[] { diff --git a/osu.Game/Screens/Play/PlayerSettings/DiscussionSettings.cs b/osu.Game/Screens/Play/PlayerSettings/DiscussionSettings.cs index 98ae457dbd..5963352e5b 100644 --- a/osu.Game/Screens/Play/PlayerSettings/DiscussionSettings.cs +++ b/osu.Game/Screens/Play/PlayerSettings/DiscussionSettings.cs @@ -13,14 +13,14 @@ namespace osu.Game.Screens.Play.PlayerSettings protected override string Title => @"discussions"; [BackgroundDependencyLoader] - private void load(GameConfigManager config) + private void load(OsuConfigManager config) { Children = new Drawable[] { new PlayerCheckbox { LabelText = "Show floating comments", - Bindable = config.GetBindable(GameSetting.FloatingComments) + Bindable = config.GetBindable(OsuSetting.FloatingComments) }, new FocusedTextBox { diff --git a/osu.Game/Screens/Play/PlayerSettings/InputSettings.cs b/osu.Game/Screens/Play/PlayerSettings/InputSettings.cs index 16737a53ee..826be792bd 100644 --- a/osu.Game/Screens/Play/PlayerSettings/InputSettings.cs +++ b/osu.Game/Screens/Play/PlayerSettings/InputSettings.cs @@ -25,6 +25,6 @@ namespace osu.Game.Screens.Play.PlayerSettings } [BackgroundDependencyLoader] - private void load(GameConfigManager config) => mouseButtonsCheckbox.Bindable = config.GetBindable(GameSetting.MouseDisableButtons); + private void load(OsuConfigManager config) => mouseButtonsCheckbox.Bindable = config.GetBindable(OsuSetting.MouseDisableButtons); } } diff --git a/osu.Game/Screens/Play/PlayerSettings/VisualSettings.cs b/osu.Game/Screens/Play/PlayerSettings/VisualSettings.cs index b2842957e0..aec42eb024 100644 --- a/osu.Game/Screens/Play/PlayerSettings/VisualSettings.cs +++ b/osu.Game/Screens/Play/PlayerSettings/VisualSettings.cs @@ -43,13 +43,13 @@ namespace osu.Game.Screens.Play.PlayerSettings } [BackgroundDependencyLoader] - private void load(GameConfigManager config) + private void load(OsuConfigManager config) { - dimSliderBar.Bindable = config.GetBindable(GameSetting.DimLevel); - blurSliderBar.Bindable = config.GetBindable(GameSetting.BlurLevel); - showStoryboardToggle.Bindable = config.GetBindable(GameSetting.ShowStoryboard); - beatmapSkinsToggle.Bindable = config.GetBindable(GameSetting.BeatmapSkins); - beatmapHitsoundsToggle.Bindable = config.GetBindable(GameSetting.BeatmapHitsounds); + dimSliderBar.Bindable = config.GetBindable(OsuSetting.DimLevel); + blurSliderBar.Bindable = config.GetBindable(OsuSetting.BlurLevel); + showStoryboardToggle.Bindable = config.GetBindable(OsuSetting.ShowStoryboard); + beatmapSkinsToggle.Bindable = config.GetBindable(OsuSetting.BeatmapSkins); + beatmapHitsoundsToggle.Bindable = config.GetBindable(OsuSetting.BeatmapHitsounds); } } } diff --git a/osu.Game/Screens/Play/ScreenWithBeatmapBackground.cs b/osu.Game/Screens/Play/ScreenWithBeatmapBackground.cs index 09827a9a2c..1c127dbdef 100644 --- a/osu.Game/Screens/Play/ScreenWithBeatmapBackground.cs +++ b/osu.Game/Screens/Play/ScreenWithBeatmapBackground.cs @@ -33,11 +33,11 @@ namespace osu.Game.Screens.Play #endregion [BackgroundDependencyLoader] - private void load(GameConfigManager config) + private void load(OsuConfigManager config) { - DimLevel = config.GetBindable(GameSetting.DimLevel); - BlurLevel = config.GetBindable(GameSetting.BlurLevel); - ShowStoryboard = config.GetBindable(GameSetting.ShowStoryboard); + DimLevel = config.GetBindable(OsuSetting.DimLevel); + BlurLevel = config.GetBindable(OsuSetting.BlurLevel); + ShowStoryboard = config.GetBindable(OsuSetting.ShowStoryboard); } protected override void OnEntering(Screen last) diff --git a/osu.Game/Screens/Select/BeatmapCarousel.cs b/osu.Game/Screens/Select/BeatmapCarousel.cs index 086e801496..1670bf4de8 100644 --- a/osu.Game/Screens/Select/BeatmapCarousel.cs +++ b/osu.Game/Screens/Select/BeatmapCarousel.cs @@ -125,10 +125,10 @@ namespace osu.Game.Screens.Select } [BackgroundDependencyLoader(permitNulls: true)] - private void load(GameConfigManager config) + private void load(OsuConfigManager config) { - config.BindWith(GameSetting.RandomSelectAlgorithm, RandomAlgorithm); - config.BindWith(GameSetting.SongSelectRightMouseScroll, RightClickScrollingEnabled); + config.BindWith(OsuSetting.RandomSelectAlgorithm, RandomAlgorithm); + config.BindWith(OsuSetting.SongSelectRightMouseScroll, RightClickScrollingEnabled); RightClickScrollingEnabled.ValueChanged += v => RightMouseScrollbar = v; RightClickScrollingEnabled.TriggerChange(); diff --git a/osu.Game/Screens/Select/BeatmapDetailAreaTabControl.cs b/osu.Game/Screens/Select/BeatmapDetailAreaTabControl.cs index 1b943e432c..002633e8b9 100644 --- a/osu.Game/Screens/Select/BeatmapDetailAreaTabControl.cs +++ b/osu.Game/Screens/Select/BeatmapDetailAreaTabControl.cs @@ -31,11 +31,11 @@ namespace osu.Game.Screens.Select } [BackgroundDependencyLoader] - private void load(OsuColour colour, GameConfigManager config) + private void load(OsuColour colour, OsuConfigManager config) { modsCheckbox.AccentColour = tabs.AccentColour = colour.YellowLight; - selectedTab = config.GetBindable(GameSetting.BeatmapDetailTab); + selectedTab = config.GetBindable(OsuSetting.BeatmapDetailTab); tabs.Current.BindTo(selectedTab); tabs.Current.TriggerChange(); diff --git a/osu.Game/Screens/Select/FilterControl.cs b/osu.Game/Screens/Select/FilterControl.cs index 2fd0794767..42f6606218 100644 --- a/osu.Game/Screens/Select/FilterControl.cs +++ b/osu.Game/Screens/Select/FilterControl.cs @@ -173,11 +173,11 @@ namespace osu.Game.Screens.Select public readonly Box Background; [BackgroundDependencyLoader(permitNulls: true)] - private void load(OsuColour colours, IBindable parentRuleset, GameConfigManager config) + private void load(OsuColour colours, IBindable parentRuleset, OsuConfigManager config) { sortTabs.AccentColour = colours.GreenLight; - showConverted = config.GetBindable(GameSetting.ShowConvertedBeatmaps); + showConverted = config.GetBindable(OsuSetting.ShowConvertedBeatmaps); showConverted.ValueChanged += val => updateCriteria(); ruleset.BindTo(parentRuleset); diff --git a/osu.Game/Skinning/LocalSkinOverrideContainer.cs b/osu.Game/Skinning/LocalSkinOverrideContainer.cs index 9f736375a9..8c172ffbcc 100644 --- a/osu.Game/Skinning/LocalSkinOverrideContainer.cs +++ b/osu.Game/Skinning/LocalSkinOverrideContainer.cs @@ -74,10 +74,10 @@ namespace osu.Game.Skinning } [BackgroundDependencyLoader] - private void load(GameConfigManager config) + private void load(OsuConfigManager config) { - config.BindWith(GameSetting.BeatmapSkins, beatmapSkins); - config.BindWith(GameSetting.BeatmapHitsounds, beatmapHitsounds); + config.BindWith(OsuSetting.BeatmapSkins, beatmapSkins); + config.BindWith(OsuSetting.BeatmapHitsounds, beatmapHitsounds); } protected override void LoadComplete()