1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 23:47:24 +08:00

Merge pull request #754 from peppy/settings-not-options

Change all instances of options to settings where applicable
This commit is contained in:
Dan Balasescu 2017-05-15 11:20:45 +09:00 committed by GitHub
commit 1632380002
63 changed files with 313 additions and 313 deletions

@ -1 +1 @@
Subproject commit e1ac6316aa3862efb8e79e585a7b4c901a4e1b3c
Subproject commit fa44e5a47e20956b12e598e85159a1a25b500b3c

View File

@ -6,18 +6,18 @@ using osu.Game.Overlays;
namespace osu.Desktop.VisualTests.Tests
{
internal class TestCaseOptions : TestCase
internal class TestCaseSettings : TestCase
{
public override string Description => @"Tests the options overlay";
public override string Description => @"Tests the settings overlay";
private OptionsOverlay options;
private SettingsOverlay settings;
public override void Reset()
{
base.Reset();
Children = new[] { options = new OptionsOverlay() };
options.ToggleVisibility();
Children = new[] { settings = new SettingsOverlay() };
settings.ToggleVisibility();
}
}
}

View File

@ -211,7 +211,7 @@
<Compile Include="Tests\TestCaseTwoLayerButton.cs" />
<Compile Include="VisualTestGame.cs" />
<Compile Include="Platform\TestStorage.cs" />
<Compile Include="Tests\TestCaseOptions.cs" />
<Compile Include="Tests\TestCaseSettings.cs" />
<Compile Include="Tests\TestCaseSongProgress.cs" />
<Compile Include="Tests\TestCaseMods.cs" />
<Compile Include="Tests\TestCaseDialogOverlay.cs" />

View File

@ -97,8 +97,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
snakingIn = config.GetBindable<bool>(OsuConfig.SnakingInSliders);
snakingOut = config.GetBindable<bool>(OsuConfig.SnakingOutSliders);
snakingIn = config.GetBindable<bool>(OsuSetting.SnakingInSliders);
snakingOut = config.GetBindable<bool>(OsuSetting.SnakingOutSliders);
reloadTexture();
}

View File

@ -8,71 +8,71 @@ using osu.Game.Screens.Select;
namespace osu.Game.Configuration
{
public class OsuConfigManager : ConfigManager<OsuConfig>
public class OsuConfigManager : ConfigManager<OsuSetting>
{
protected override void InitialiseDefaults()
{
// UI/selection defaults
Set(OsuConfig.Ruleset, 0, 0, int.MaxValue);
Set(OsuConfig.BeatmapDetailTab, BeatmapDetailTab.Details);
Set(OsuSetting.Ruleset, 0, 0, int.MaxValue);
Set(OsuSetting.BeatmapDetailTab, BeatmapDetailTab.Details);
Set(OsuConfig.DisplayStarsMinimum, 0.0, 0, 10);
Set(OsuConfig.DisplayStarsMaximum, 10.0, 0, 10);
Set(OsuSetting.DisplayStarsMinimum, 0.0, 0, 10);
Set(OsuSetting.DisplayStarsMaximum, 10.0, 0, 10);
Set(OsuConfig.ChatDisplayHeight, ChatOverlay.DEFAULT_HEIGHT, 0.2, 1);
Set(OsuSetting.ChatDisplayHeight, ChatOverlay.DEFAULT_HEIGHT, 0.2, 1);
// Online settings
Set(OsuConfig.Username, string.Empty);
Set(OsuConfig.Token, string.Empty);
Set(OsuSetting.Username, string.Empty);
Set(OsuSetting.Token, string.Empty);
Set(OsuConfig.SavePassword, false).ValueChanged += val =>
Set(OsuSetting.SavePassword, false).ValueChanged += val =>
{
if (val) Set(OsuConfig.SaveUsername, true);
if (val) Set(OsuSetting.SaveUsername, true);
};
Set(OsuConfig.SaveUsername, true).ValueChanged += val =>
Set(OsuSetting.SaveUsername, true).ValueChanged += val =>
{
if (!val) Set(OsuConfig.SavePassword, false);
if (!val) Set(OsuSetting.SavePassword, false);
};
// Audio
Set(OsuConfig.AudioDevice, string.Empty);
Set(OsuSetting.AudioDevice, string.Empty);
Set(OsuConfig.MenuVoice, true);
Set(OsuConfig.MenuMusic, true);
Set(OsuSetting.MenuVoice, true);
Set(OsuSetting.MenuMusic, true);
Set(OsuConfig.AudioOffset, 0, -500.0, 500.0);
Set(OsuSetting.AudioOffset, 0, -500.0, 500.0);
// Input
Set(OsuConfig.MenuCursorSize, 1.0, 0.5f, 2);
Set(OsuConfig.GameplayCursorSize, 1.0, 0.5f, 2);
Set(OsuSetting.MenuCursorSize, 1.0, 0.5f, 2);
Set(OsuSetting.GameplayCursorSize, 1.0, 0.5f, 2);
Set(OsuConfig.MouseDisableButtons, false);
Set(OsuConfig.MouseDisableWheel, false);
Set(OsuSetting.MouseDisableButtons, false);
Set(OsuSetting.MouseDisableWheel, false);
// Graphics
Set(OsuConfig.ShowFpsDisplay, false);
Set(OsuSetting.ShowFpsDisplay, false);
Set(OsuConfig.MenuParallax, true);
Set(OsuSetting.MenuParallax, true);
Set(OsuConfig.SnakingInSliders, true);
Set(OsuConfig.SnakingOutSliders, true);
Set(OsuSetting.SnakingInSliders, true);
Set(OsuSetting.SnakingOutSliders, true);
// Gameplay
Set(OsuConfig.DimLevel, 0.3, 0, 1);
Set(OsuSetting.DimLevel, 0.3, 0, 1);
Set(OsuConfig.ShowInterface, true);
Set(OsuConfig.KeyOverlay, false);
Set(OsuSetting.ShowInterface, true);
Set(OsuSetting.KeyOverlay, false);
// Update
Set(OsuConfig.ReleaseStream, ReleaseStream.Lazer);
Set(OsuSetting.ReleaseStream, ReleaseStream.Lazer);
}
public OsuConfigManager(Storage storage) : base(storage)
@ -80,7 +80,7 @@ namespace osu.Game.Configuration
}
}
public enum OsuConfig
public enum OsuSetting
{
Ruleset,
Token,

View File

@ -39,7 +39,7 @@ namespace osu.Game.Graphics.Containers
private void load(UserInputManager input, OsuConfigManager config)
{
this.input = input;
parallaxEnabled = config.GetBindable<bool>(OsuConfig.MenuParallax);
parallaxEnabled = config.GetBindable<bool>(OsuSetting.MenuParallax);
parallaxEnabled.ValueChanged += delegate
{
if (!parallaxEnabled)

View File

@ -114,7 +114,7 @@ namespace osu.Game.Graphics.Cursor
},
};
cursorScale = config.GetBindable<double>(OsuConfig.GameplayCursorSize);
cursorScale = config.GetBindable<double>(OsuSetting.GameplayCursorSize);
cursorScale.ValueChanged += newScale => cursorContainer.Scale = new Vector2((float)cursorScale);
cursorScale.TriggerChange();
}

View File

@ -128,7 +128,7 @@ namespace osu.Game.Graphics.Cursor
}
};
cursorScale = config.GetBindable<double>(OsuConfig.MenuCursorSize);
cursorScale = config.GetBindable<double>(OsuSetting.MenuCursorSize);
cursorScale.ValueChanged += newScale => cursorContainer.Scale = new Vector2((float)newScale);
cursorScale.TriggerChange();
}

View File

@ -62,14 +62,14 @@ namespace osu.Game
private readonly string[] args;
private OptionsOverlay options;
private SettingsOverlay settings;
public OsuGame(string[] args = null)
{
this.args = args;
}
public void ToggleOptions() => options.ToggleVisibility();
public void ToggleSettings() => settings.ToggleVisibility();
[BackgroundDependencyLoader]
private void load()
@ -88,7 +88,7 @@ namespace osu.Game
Dependencies.Cache(this);
configRuleset = LocalConfig.GetBindable<int>(OsuConfig.Ruleset);
configRuleset = LocalConfig.GetBindable<int>(OsuSetting.Ruleset);
Ruleset.Value = RulesetDatabase.GetRuleset(configRuleset.Value);
Ruleset.ValueChanged += r => configRuleset.Value = r.ID ?? 0;
}
@ -161,7 +161,7 @@ namespace osu.Game
//overlay elements
LoadComponentAsync(chat = new ChatOverlay { Depth = -1 }, mainContent.Add);
LoadComponentAsync(options = new OptionsOverlay { Depth = -1 }, overlayContent.Add);
LoadComponentAsync(settings = new SettingsOverlay { Depth = -1 }, overlayContent.Add);
LoadComponentAsync(musicController = new MusicController
{
Depth = -2,
@ -192,7 +192,7 @@ namespace osu.Game
});
};
Dependencies.Cache(options);
Dependencies.Cache(settings);
Dependencies.Cache(chat);
Dependencies.Cache(musicController);
Dependencies.Cache(notificationManager);
@ -204,15 +204,15 @@ namespace osu.Game
OnHome = delegate { intro?.ChildScreen?.MakeCurrent(); },
}, overlayContent.Add);
options.StateChanged += delegate
settings.StateChanged += delegate
{
switch (options.State)
switch (settings.State)
{
case Visibility.Hidden:
intro.MoveToX(0, OptionsOverlay.TRANSITION_LENGTH, EasingTypes.OutQuint);
intro.MoveToX(0, SettingsOverlay.TRANSITION_LENGTH, EasingTypes.OutQuint);
break;
case Visibility.Visible:
intro.MoveToX(OptionsOverlay.SIDEBAR_WIDTH / 2, OptionsOverlay.TRANSITION_LENGTH, EasingTypes.OutQuint);
intro.MoveToX(SettingsOverlay.SIDEBAR_WIDTH / 2, SettingsOverlay.TRANSITION_LENGTH, EasingTypes.OutQuint);
break;
}
};
@ -247,7 +247,7 @@ namespace osu.Game
Toolbar.ToggleVisibility();
return true;
case Key.O:
options.ToggleVisibility();
settings.ToggleVisibility();
return true;
}
}
@ -276,7 +276,7 @@ namespace osu.Game
//central game screen change logic.
if (!currentScreen.ShowOverlays)
{
options.State = Visibility.Hidden;
settings.State = Visibility.Hidden;
Toolbar.State = Visibility.Hidden;
musicController.State = Visibility.Hidden;
chat.State = Visibility.Hidden;

View File

@ -125,8 +125,8 @@ namespace osu.Game
Dependencies.Cache(API = new APIAccess
{
Username = LocalConfig.Get<string>(OsuConfig.Username),
Token = LocalConfig.Get<string>(OsuConfig.Token)
Username = LocalConfig.Get<string>(OsuSetting.Username),
Token = LocalConfig.Get<string>(OsuSetting.Token)
});
API.Register(this);
@ -137,7 +137,7 @@ namespace osu.Game
switch (state)
{
case APIState.Online:
LocalConfig.Set(OsuConfig.Username, LocalConfig.Get<bool>(OsuConfig.SaveUsername) ? API.Username : string.Empty);
LocalConfig.Set(OsuSetting.Username, LocalConfig.Get<bool>(OsuSetting.SaveUsername) ? API.Username : string.Empty);
break;
}
}
@ -166,7 +166,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<bool>(OsuConfig.ShowFpsDisplay);
fpsDisplayVisible = LocalConfig.GetBindable<bool>(OsuSetting.ShowFpsDisplay);
fpsDisplayVisible.ValueChanged += val =>
{
FrameStatisticsMode = val ? FrameStatisticsMode.Minimal : FrameStatisticsMode.None;
@ -192,7 +192,7 @@ namespace osu.Game
//refresh token may have changed.
if (LocalConfig != null && API != null)
{
LocalConfig.Set(OsuConfig.Token, LocalConfig.Get<bool>(OsuConfig.SavePassword) ? API.Token : string.Empty);
LocalConfig.Set(OsuSetting.Token, LocalConfig.Get<bool>(OsuSetting.SavePassword) ? API.Token : string.Empty);
LocalConfig.Save();
}

View File

@ -195,7 +195,7 @@ namespace osu.Game.Overlays
this.api = api;
api.Register(this);
chatHeight = config.GetBindable<double>(OsuConfig.ChatDisplayHeight);
chatHeight = config.GetBindable<double>(OsuSetting.ChatDisplayHeight);
chatHeight.ValueChanged += h =>
{
Height = (float)h;

View File

@ -7,14 +7,14 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Primitives;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
using osu.Game.Overlays.Options.Sections.General;
using osu.Game.Overlays.Settings.Sections.General;
using OpenTK.Graphics;
namespace osu.Game.Overlays
{
internal class LoginOverlay : FocusedOverlayContainer
{
private LoginOptions optionsSection;
private LoginSettings settingsSection;
private const float transition_time = 400;
@ -42,7 +42,7 @@ namespace osu.Game.Overlays
AutoSizeEasing = EasingTypes.OutQuint,
Children = new Drawable[]
{
optionsSection = new LoginOptions
settingsSection = new LoginSettings
{
Padding = new MarginPadding(10),
},
@ -64,17 +64,17 @@ namespace osu.Game.Overlays
{
base.PopIn();
optionsSection.Bounding = true;
settingsSection.Bounding = true;
FadeIn(transition_time, EasingTypes.OutQuint);
optionsSection.TriggerFocus();
settingsSection.TriggerFocus();
}
protected override void PopOut()
{
base.PopOut();
optionsSection.Bounding = false;
settingsSection.Bounding = false;
FadeOut(transition_time);
}
}

View File

@ -7,14 +7,14 @@ using osu.Framework.Graphics;
using System.Collections.Generic;
using System.Linq;
namespace osu.Game.Overlays.Options.Sections.Audio
namespace osu.Game.Overlays.Settings.Sections.Audio
{
public class AudioDevicesOptions : OptionsSubsection
public class AudioDevicesSettings : SettingsSubsection
{
protected override string Header => "Devices";
private AudioManager audio;
private OptionDropdown<string> dropdown;
private SettingsDropdown<string> dropdown;
[BackgroundDependencyLoader]
private void load(AudioManager audio)
@ -56,7 +56,7 @@ namespace osu.Game.Overlays.Options.Sections.Audio
Children = new Drawable[]
{
dropdown = new OptionDropdown<string>
dropdown = new SettingsDropdown<string>
{
Bindable = audio.AudioDevice
},

View File

@ -4,9 +4,9 @@
using osu.Framework.Allocation;
using osu.Game.Configuration;
namespace osu.Game.Overlays.Options.Sections.Audio
namespace osu.Game.Overlays.Settings.Sections.Audio
{
public class MainMenuOptions : OptionsSubsection
public class MainMenuSettings : SettingsSubsection
{
protected override string Header => "Main Menu";
@ -15,15 +15,15 @@ namespace osu.Game.Overlays.Options.Sections.Audio
{
Children = new[]
{
new OptionCheckbox
new SettingsCheckbox
{
LabelText = "Interface voices",
Bindable = config.GetBindable<bool>(OsuConfig.MenuVoice)
Bindable = config.GetBindable<bool>(OsuSetting.MenuVoice)
},
new OptionCheckbox
new SettingsCheckbox
{
LabelText = "osu! music theme",
Bindable = config.GetBindable<bool>(OsuConfig.MenuMusic)
Bindable = config.GetBindable<bool>(OsuSetting.MenuMusic)
},
};
}

View File

@ -6,9 +6,9 @@ using osu.Framework.Graphics;
using osu.Game.Configuration;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Options.Sections.Audio
namespace osu.Game.Overlays.Settings.Sections.Audio
{
public class OffsetOptions : OptionsSubsection
public class OffsetSettings : SettingsSubsection
{
protected override string Header => "Offset Adjustment";
@ -17,10 +17,10 @@ namespace osu.Game.Overlays.Options.Sections.Audio
{
Children = new Drawable[]
{
new OptionSlider<double, OffsetSlider>
new SettingsSlider<double, OffsetSlider>
{
LabelText = "Audio Offset",
Bindable = config.GetBindable<double>(OsuConfig.AudioOffset)
Bindable = config.GetBindable<double>(OsuSetting.AudioOffset)
},
new OsuButton
{

View File

@ -5,9 +5,9 @@ using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Graphics;
namespace osu.Game.Overlays.Options.Sections.Audio
namespace osu.Game.Overlays.Settings.Sections.Audio
{
public class VolumeOptions : OptionsSubsection
public class VolumeSettings : SettingsSubsection
{
protected override string Header => "Volume";
@ -16,9 +16,9 @@ namespace osu.Game.Overlays.Options.Sections.Audio
{
Children = new Drawable[]
{
new OptionSlider<double> { LabelText = "Master", Bindable = audio.Volume },
new OptionSlider<double> { LabelText = "Effect", Bindable = audio.VolumeSample },
new OptionSlider<double> { LabelText = "Music", Bindable = audio.VolumeTrack },
new SettingsSlider<double> { LabelText = "Master", Bindable = audio.Volume },
new SettingsSlider<double> { LabelText = "Effect", Bindable = audio.VolumeSample },
new SettingsSlider<double> { LabelText = "Music", Bindable = audio.VolumeTrack },
};
}
}

View File

@ -3,11 +3,11 @@
using osu.Framework.Graphics;
using osu.Game.Graphics;
using osu.Game.Overlays.Options.Sections.Audio;
using osu.Game.Overlays.Settings.Sections.Audio;
namespace osu.Game.Overlays.Options.Sections
namespace osu.Game.Overlays.Settings.Sections
{
public class AudioSection : OptionsSection
public class AudioSection : SettingsSection
{
public override string Header => "Audio";
public override FontAwesome Icon => FontAwesome.fa_headphones;
@ -16,10 +16,10 @@ namespace osu.Game.Overlays.Options.Sections
{
Children = new Drawable[]
{
new AudioDevicesOptions(),
new VolumeOptions(),
new OffsetOptions(),
new MainMenuOptions(),
new AudioDevicesSettings(),
new VolumeSettings(),
new OffsetSettings(),
new MainMenuSettings(),
};
}
}

View File

@ -8,9 +8,9 @@ using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Options.Sections.Debug
namespace osu.Game.Overlays.Settings.Sections.Debug
{
public class GCOptions : OptionsSubsection
public class GCSettings : SettingsSubsection
{
protected override string Header => "Garbage Collector";
@ -19,7 +19,7 @@ namespace osu.Game.Overlays.Options.Sections.Debug
{
Children = new Drawable[]
{
new OptionEnumDropdown<GCLatencyMode>
new SettingsEnumDropdown<GCLatencyMode>
{
LabelText = "Active mode",
Bindable = config.GetBindable<GCLatencyMode>(FrameworkDebugConfig.ActiveGCMode)

View File

@ -5,9 +5,9 @@ using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
namespace osu.Game.Overlays.Options.Sections.Debug
namespace osu.Game.Overlays.Settings.Sections.Debug
{
public class GeneralOptions : OptionsSubsection
public class GeneralSettings : SettingsSubsection
{
protected override string Header => "General";
@ -16,7 +16,7 @@ namespace osu.Game.Overlays.Options.Sections.Debug
{
Children = new Drawable[]
{
new OptionCheckbox
new SettingsCheckbox
{
LabelText = "Bypass caching",
Bindable = config.GetBindable<bool>(FrameworkDebugConfig.BypassCaching)

View File

@ -3,11 +3,11 @@
using osu.Framework.Graphics;
using osu.Game.Graphics;
using osu.Game.Overlays.Options.Sections.Debug;
using osu.Game.Overlays.Settings.Sections.Debug;
namespace osu.Game.Overlays.Options.Sections
namespace osu.Game.Overlays.Settings.Sections
{
public class DebugSection : OptionsSection
public class DebugSection : SettingsSection
{
public override string Header => "Debug";
public override FontAwesome Icon => FontAwesome.fa_bug;
@ -16,8 +16,8 @@ namespace osu.Game.Overlays.Options.Sections
{
Children = new Drawable[]
{
new GeneralOptions(),
new GCOptions(),
new GeneralSettings(),
new GCSettings(),
};
}
}

View File

@ -5,9 +5,9 @@ using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Configuration;
namespace osu.Game.Overlays.Options.Sections.Gameplay
namespace osu.Game.Overlays.Settings.Sections.Gameplay
{
public class GeneralOptions : OptionsSubsection
public class GeneralSettings : SettingsSubsection
{
protected override string Header => "General";
@ -16,20 +16,20 @@ namespace osu.Game.Overlays.Options.Sections.Gameplay
{
Children = new Drawable[]
{
new OptionSlider<double>
new SettingsSlider<double>
{
LabelText = "Background dim",
Bindable = config.GetBindable<double>(OsuConfig.DimLevel)
Bindable = config.GetBindable<double>(OsuSetting.DimLevel)
},
new OptionCheckbox
new SettingsCheckbox
{
LabelText = "Show score overlay",
Bindable = config.GetBindable<bool>(OsuConfig.ShowInterface)
Bindable = config.GetBindable<bool>(OsuSetting.ShowInterface)
},
new OptionCheckbox
new SettingsCheckbox
{
LabelText = "Always show key overlay",
Bindable = config.GetBindable<bool>(OsuConfig.KeyOverlay)
Bindable = config.GetBindable<bool>(OsuSetting.KeyOverlay)
},
};
}

View File

@ -6,9 +6,9 @@ using osu.Framework.Graphics;
using osu.Game.Configuration;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Options.Sections.Gameplay
namespace osu.Game.Overlays.Settings.Sections.Gameplay
{
public class SongSelectOptions : OptionsSubsection
public class SongSelectSettings : SettingsSubsection
{
protected override string Header => "Song Select";
@ -17,15 +17,15 @@ namespace osu.Game.Overlays.Options.Sections.Gameplay
{
Children = new Drawable[]
{
new OptionSlider<double, StarSlider>
new SettingsSlider<double, StarSlider>
{
LabelText = "Display beatmaps from",
Bindable = config.GetBindable<double>(OsuConfig.DisplayStarsMinimum)
Bindable = config.GetBindable<double>(OsuSetting.DisplayStarsMinimum)
},
new OptionSlider<double, StarSlider>
new SettingsSlider<double, StarSlider>
{
LabelText = "up to",
Bindable = config.GetBindable<double>(OsuConfig.DisplayStarsMaximum)
Bindable = config.GetBindable<double>(OsuSetting.DisplayStarsMaximum)
},
};
}

View File

@ -3,11 +3,11 @@
using osu.Framework.Graphics;
using osu.Game.Graphics;
using osu.Game.Overlays.Options.Sections.Gameplay;
using osu.Game.Overlays.Settings.Sections.Gameplay;
namespace osu.Game.Overlays.Options.Sections
namespace osu.Game.Overlays.Settings.Sections
{
public class GameplaySection : OptionsSection
public class GameplaySection : SettingsSection
{
public override string Header => "Gameplay";
public override FontAwesome Icon => FontAwesome.fa_circle_o;
@ -16,8 +16,8 @@ namespace osu.Game.Overlays.Options.Sections
{
Children = new Drawable[]
{
new GeneralOptions(),
new SongSelectOptions(),
new GeneralSettings(),
new SongSelectSettings(),
};
}
}

View File

@ -5,9 +5,9 @@ using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
namespace osu.Game.Overlays.Options.Sections.General
namespace osu.Game.Overlays.Settings.Sections.General
{
public class LanguageOptions : OptionsSubsection
public class LanguageSettings : SettingsSubsection
{
protected override string Header => "Language";
@ -16,10 +16,10 @@ namespace osu.Game.Overlays.Options.Sections.General
{
Children = new Drawable[]
{
new OptionCheckbox
new SettingsCheckbox
{
LabelText = "Prefer metadata in original language",
Bindable = frameworkConfig.GetBindable<bool>(FrameworkConfig.ShowUnicode)
Bindable = frameworkConfig.GetBindable<bool>(FrameworkSetting.ShowUnicode)
},
};
}

View File

@ -13,9 +13,9 @@ using osu.Game.Online.API;
using OpenTK;
using osu.Framework.Input;
namespace osu.Game.Overlays.Options.Sections.General
namespace osu.Game.Overlays.Settings.Sections.General
{
public class LoginOptions : OptionsSubsection, IOnlineComponent
public class LoginSettings : SettingsSubsection, IOnlineComponent
{
private bool bounding = true;
private LoginForm form;
@ -132,15 +132,15 @@ namespace osu.Game.Overlays.Options.Sections.General
TabbableContentContainer = this,
OnCommit = (sender, newText) => performLogin()
},
new OptionCheckbox
new SettingsCheckbox
{
LabelText = "Remember username",
Bindable = config.GetBindable<bool>(OsuConfig.SaveUsername),
Bindable = config.GetBindable<bool>(OsuSetting.SaveUsername),
},
new OptionCheckbox
new SettingsCheckbox
{
LabelText = "Stay logged in",
Bindable = config.GetBindable<bool>(OsuConfig.SavePassword),
Bindable = config.GetBindable<bool>(OsuSetting.SavePassword),
},
new OsuButton
{

View File

@ -7,9 +7,9 @@ using osu.Framework.Platform;
using osu.Game.Configuration;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Options.Sections.General
namespace osu.Game.Overlays.Settings.Sections.General
{
public class UpdateOptions : OptionsSubsection
public class UpdateSettings : SettingsSubsection
{
protected override string Header => "Updates";
@ -18,10 +18,10 @@ namespace osu.Game.Overlays.Options.Sections.General
{
Children = new Drawable[]
{
new OptionEnumDropdown<ReleaseStream>
new SettingsEnumDropdown<ReleaseStream>
{
LabelText = "Release stream",
Bindable = config.GetBindable<ReleaseStream>(OsuConfig.ReleaseStream),
Bindable = config.GetBindable<ReleaseStream>(OsuSetting.ReleaseStream),
},
new OsuButton
{

View File

@ -3,11 +3,11 @@
using osu.Framework.Graphics;
using osu.Game.Graphics;
using osu.Game.Overlays.Options.Sections.General;
using osu.Game.Overlays.Settings.Sections.General;
namespace osu.Game.Overlays.Options.Sections
namespace osu.Game.Overlays.Settings.Sections
{
public class GeneralSection : OptionsSection
public class GeneralSection : SettingsSection
{
public override string Header => "General";
public override FontAwesome Icon => FontAwesome.fa_gear;
@ -16,8 +16,8 @@ namespace osu.Game.Overlays.Options.Sections
{
Children = new Drawable[]
{
new LanguageOptions(),
new UpdateOptions(),
new LanguageSettings(),
new UpdateSettings(),
};
}
}

View File

@ -5,9 +5,9 @@ using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Configuration;
namespace osu.Game.Overlays.Options.Sections.Graphics
namespace osu.Game.Overlays.Settings.Sections.Graphics
{
public class DetailOptions : OptionsSubsection
public class DetailSettings : SettingsSubsection
{
protected override string Header => "Detail Settings";
@ -16,15 +16,15 @@ namespace osu.Game.Overlays.Options.Sections.Graphics
{
Children = new Drawable[]
{
new OptionCheckbox
new SettingsCheckbox
{
LabelText = "Snaking in sliders",
Bindable = config.GetBindable<bool>(OsuConfig.SnakingInSliders)
Bindable = config.GetBindable<bool>(OsuSetting.SnakingInSliders)
},
new OptionCheckbox
new SettingsCheckbox
{
LabelText = "Snaking out sliders",
Bindable = config.GetBindable<bool>(OsuConfig.SnakingOutSliders)
Bindable = config.GetBindable<bool>(OsuSetting.SnakingOutSliders)
},
};
}

View File

@ -5,43 +5,43 @@ using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
namespace osu.Game.Overlays.Options.Sections.Graphics
namespace osu.Game.Overlays.Settings.Sections.Graphics
{
public class LayoutOptions : OptionsSubsection
public class LayoutSettings : SettingsSubsection
{
protected override string Header => "Layout";
private OptionSlider<double> letterboxPositionX;
private OptionSlider<double> letterboxPositionY;
private SettingsSlider<double> letterboxPositionX;
private SettingsSlider<double> letterboxPositionY;
private Bindable<bool> letterboxing;
[BackgroundDependencyLoader]
private void load(FrameworkConfigManager config)
{
letterboxing = config.GetBindable<bool>(FrameworkConfig.Letterboxing);
letterboxing = config.GetBindable<bool>(FrameworkSetting.Letterboxing);
Children = new Drawable[]
{
new OptionEnumDropdown<WindowMode>
new SettingsEnumDropdown<WindowMode>
{
LabelText = "Screen mode",
Bindable = config.GetBindable<WindowMode>(FrameworkConfig.WindowMode),
Bindable = config.GetBindable<WindowMode>(FrameworkSetting.WindowMode),
},
new OptionCheckbox
new SettingsCheckbox
{
LabelText = "Letterboxing",
Bindable = letterboxing,
},
letterboxPositionX = new OptionSlider<double>
letterboxPositionX = new SettingsSlider<double>
{
LabelText = "Horizontal position",
Bindable = config.GetBindable<double>(FrameworkConfig.LetterboxPositionX)
Bindable = config.GetBindable<double>(FrameworkSetting.LetterboxPositionX)
},
letterboxPositionY = new OptionSlider<double>
letterboxPositionY = new SettingsSlider<double>
{
LabelText = "Vertical position",
Bindable = config.GetBindable<double>(FrameworkConfig.LetterboxPositionY)
Bindable = config.GetBindable<double>(FrameworkSetting.LetterboxPositionY)
},
};

View File

@ -4,9 +4,9 @@
using osu.Framework.Allocation;
using osu.Game.Configuration;
namespace osu.Game.Overlays.Options.Sections.Graphics
namespace osu.Game.Overlays.Settings.Sections.Graphics
{
public class MainMenuOptions : OptionsSubsection
public class MainMenuSettings : SettingsSubsection
{
protected override string Header => "User Interface";
@ -15,10 +15,10 @@ namespace osu.Game.Overlays.Options.Sections.Graphics
{
Children = new[]
{
new OptionCheckbox
new SettingsCheckbox
{
LabelText = "Parallax",
Bindable = config.GetBindable<bool>(OsuConfig.MenuParallax)
Bindable = config.GetBindable<bool>(OsuSetting.MenuParallax)
},
};
}

View File

@ -6,9 +6,9 @@ using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Game.Configuration;
namespace osu.Game.Overlays.Options.Sections.Graphics
namespace osu.Game.Overlays.Settings.Sections.Graphics
{
public class RendererOptions : OptionsSubsection
public class RendererSettings : SettingsSubsection
{
protected override string Header => "Renderer";
@ -19,15 +19,15 @@ namespace osu.Game.Overlays.Options.Sections.Graphics
Children = new Drawable[]
{
// TODO: this needs to be a custom dropdown at some point
new OptionEnumDropdown<FrameSync>
new SettingsEnumDropdown<FrameSync>
{
LabelText = "Frame limiter",
Bindable = config.GetBindable<FrameSync>(FrameworkConfig.FrameSync)
Bindable = config.GetBindable<FrameSync>(FrameworkSetting.FrameSync)
},
new OptionCheckbox
new SettingsCheckbox
{
LabelText = "Show FPS",
Bindable = osuConfig.GetBindable<bool>(OsuConfig.ShowFpsDisplay)
Bindable = osuConfig.GetBindable<bool>(OsuSetting.ShowFpsDisplay)
},
};
}

View File

@ -3,11 +3,11 @@
using osu.Framework.Graphics;
using osu.Game.Graphics;
using osu.Game.Overlays.Options.Sections.Graphics;
using osu.Game.Overlays.Settings.Sections.Graphics;
namespace osu.Game.Overlays.Options.Sections
namespace osu.Game.Overlays.Settings.Sections
{
public class GraphicsSection : OptionsSection
public class GraphicsSection : SettingsSection
{
public override string Header => "Graphics";
public override FontAwesome Icon => FontAwesome.fa_laptop;
@ -16,10 +16,10 @@ namespace osu.Game.Overlays.Options.Sections
{
Children = new Drawable[]
{
new RendererOptions(),
new LayoutOptions(),
new DetailOptions(),
new MainMenuOptions(),
new RendererSettings(),
new LayoutSettings(),
new DetailSettings(),
new MainMenuSettings(),
};
}
}

View File

@ -4,13 +4,13 @@
using osu.Framework.Graphics;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Options.Sections.Input
namespace osu.Game.Overlays.Settings.Sections.Input
{
public class KeyboardOptions : OptionsSubsection
public class KeyboardSettings : SettingsSubsection
{
protected override string Header => "Keyboard";
public KeyboardOptions()
public KeyboardSettings()
{
Children = new Drawable[]
{

View File

@ -8,9 +8,9 @@ using osu.Framework.Input;
using osu.Game.Configuration;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Options.Sections.Input
namespace osu.Game.Overlays.Settings.Sections.Input
{
public class MouseOptions : OptionsSubsection
public class MouseSettings : SettingsSubsection
{
protected override string Header => "Mouse";
@ -19,20 +19,20 @@ namespace osu.Game.Overlays.Options.Sections.Input
{
Children = new Drawable[]
{
new OptionEnumDropdown<ConfineMouseMode>
new SettingsEnumDropdown<ConfineMouseMode>
{
LabelText = "Confine mouse cursor",
Bindable = config.GetBindable<ConfineMouseMode>(FrameworkConfig.ConfineMouseMode),
Bindable = config.GetBindable<ConfineMouseMode>(FrameworkSetting.ConfineMouseMode),
},
new OptionCheckbox
new SettingsCheckbox
{
LabelText = "Disable mouse wheel during gameplay",
Bindable = osuConfig.GetBindable<bool>(OsuConfig.MouseDisableWheel)
Bindable = osuConfig.GetBindable<bool>(OsuSetting.MouseDisableWheel)
},
new OptionCheckbox
new SettingsCheckbox
{
LabelText = "Disable mouse buttons during gameplay",
Bindable = osuConfig.GetBindable<bool>(OsuConfig.MouseDisableButtons)
Bindable = osuConfig.GetBindable<bool>(OsuSetting.MouseDisableButtons)
},
};
}

View File

@ -3,11 +3,11 @@
using osu.Framework.Graphics;
using osu.Game.Graphics;
using osu.Game.Overlays.Options.Sections.Input;
using osu.Game.Overlays.Settings.Sections.Input;
namespace osu.Game.Overlays.Options.Sections
namespace osu.Game.Overlays.Settings.Sections
{
public class InputSection : OptionsSection
public class InputSection : SettingsSection
{
public override string Header => "Input";
public override FontAwesome Icon => FontAwesome.fa_keyboard_o;
@ -16,8 +16,8 @@ namespace osu.Game.Overlays.Options.Sections
{
Children = new Drawable[]
{
new MouseOptions(),
new KeyboardOptions(),
new MouseSettings(),
new KeyboardSettings(),
};
}
}

View File

@ -5,9 +5,9 @@ using osu.Framework.Graphics;
using osu.Game.Graphics;
using OpenTK;
namespace osu.Game.Overlays.Options.Sections
namespace osu.Game.Overlays.Settings.Sections
{
public class MaintenanceSection : OptionsSection
public class MaintenanceSection : SettingsSection
{
public override string Header => "Maintenance";
public override FontAwesome Icon => FontAwesome.fa_wrench;

View File

@ -4,9 +4,9 @@
using osu.Framework.Graphics;
using osu.Game.Graphics;
namespace osu.Game.Overlays.Options.Sections
namespace osu.Game.Overlays.Settings.Sections
{
public class OnlineSection : OptionsSection
public class OnlineSection : SettingsSection
{
public override string Header => "Online";
public override FontAwesome Icon => FontAwesome.fa_globe;

View File

@ -8,9 +8,9 @@ using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface;
using OpenTK;
namespace osu.Game.Overlays.Options.Sections
namespace osu.Game.Overlays.Settings.Sections
{
public class SkinSection : OptionsSection
public class SkinSection : SettingsSection
{
public override string Header => "Skin";
public override FontAwesome Icon => FontAwesome.fa_paint_brush;
@ -21,15 +21,15 @@ namespace osu.Game.Overlays.Options.Sections
FlowContent.Spacing = new Vector2(0, 5);
Children = new Drawable[]
{
new OptionSlider<double, SizeSlider>
new SettingsSlider<double, SizeSlider>
{
LabelText = "Menu cursor size",
Bindable = config.GetBindable<double>(OsuConfig.MenuCursorSize)
Bindable = config.GetBindable<double>(OsuSetting.MenuCursorSize)
},
new OptionSlider<double, SizeSlider>
new SettingsSlider<double, SizeSlider>
{
LabelText = "Gameplay cursor size",
Bindable = config.GetBindable<double>(OsuConfig.GameplayCursorSize)
Bindable = config.GetBindable<double>(OsuSetting.GameplayCursorSize)
},
};
}

View File

@ -4,9 +4,9 @@
using osu.Framework.Graphics;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Options
namespace osu.Game.Overlays.Settings
{
public class OptionCheckbox : OptionItem<bool>
public class SettingsCheckbox : SettingsItem<bool>
{
private OsuCheckbox checkbox;

View File

@ -7,9 +7,9 @@ using osu.Framework.Graphics.Primitives;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Options
namespace osu.Game.Overlays.Settings
{
public class OptionDropdown<T> : OptionItem<T>
public class SettingsDropdown<T> : SettingsItem<T>
{
private Dropdown<T> dropdown;

View File

@ -6,14 +6,14 @@ using System.Reflection;
using System.ComponentModel;
using System.Collections.Generic;
namespace osu.Game.Overlays.Options
namespace osu.Game.Overlays.Settings
{
public class OptionEnumDropdown<T> : OptionDropdown<T>
public class SettingsEnumDropdown<T> : SettingsDropdown<T>
{
public OptionEnumDropdown()
public SettingsEnumDropdown()
{
if (!typeof(T).IsEnum)
throw new InvalidOperationException("OptionsDropdown only supports enums as the generic type argument");
throw new InvalidOperationException("SettingsDropdown only supports enums as the generic type argument");
List<KeyValuePair<string, T>> items = new List<KeyValuePair<string, T>>();
foreach(var val in (T[])Enum.GetValues(typeof(T)))

View File

@ -12,9 +12,9 @@ using osu.Game.Graphics.Sprites;
using OpenTK;
using OpenTK.Graphics;
namespace osu.Game.Overlays.Options
namespace osu.Game.Overlays.Settings
{
public class OptionsFooter : FillFlowContainer
public class SettingsFooter : FillFlowContainer
{
[BackgroundDependencyLoader]
private void load(OsuGameBase game, OsuColour colours, RulesetDatabase rulesets)

View File

@ -12,9 +12,9 @@ using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using OpenTK.Graphics;
namespace osu.Game.Overlays.Options
namespace osu.Game.Overlays.Settings
{
public class OptionsHeader : Container
public class SettingsHeader : Container
{
public SearchTextBox SearchTextBox;
@ -25,7 +25,7 @@ namespace osu.Game.Overlays.Options
public Action Exit;
/// <param name="currentScrollOffset">A reference to the current scroll position of the ScrollContainer we are contained within.</param>
public OptionsHeader(Func<float> currentScrollOffset)
public SettingsHeader(Func<float> currentScrollOffset)
{
this.currentScrollOffset = currentScrollOffset;
}
@ -55,7 +55,7 @@ namespace osu.Game.Overlays.Options
Text = "settings",
TextSize = 40,
Margin = new MarginPadding {
Left = OptionsOverlay.CONTENT_MARGINS,
Left = SettingsOverlay.CONTENT_MARGINS,
Top = Toolbar.Toolbar.TOOLTIP_HEIGHT
},
},
@ -65,7 +65,7 @@ namespace osu.Game.Overlays.Options
Text = "Change the way osu! behaves",
TextSize = 18,
Margin = new MarginPadding {
Left = OptionsOverlay.CONTENT_MARGINS,
Left = SettingsOverlay.CONTENT_MARGINS,
Bottom = 30
},
},

View File

@ -10,9 +10,9 @@ using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Graphics.Sprites;
namespace osu.Game.Overlays.Options
namespace osu.Game.Overlays.Settings
{
public abstract class OptionItem<T> : FillFlowContainer, IFilterable
public abstract class SettingsItem<T> : FillFlowContainer, IFilterable
{
protected abstract Drawable CreateControl();
@ -37,7 +37,7 @@ namespace osu.Game.Overlays.Options
}
}
// hold a reference to the provided bindable so we don't have to in every options section.
// hold a reference to the provided bindable so we don't have to in every settings section.
private Bindable<T> bindable;
public Bindable<T> Bindable
@ -65,7 +65,7 @@ namespace osu.Game.Overlays.Options
}
}
protected OptionItem()
protected SettingsItem()
{
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;

View File

@ -5,9 +5,9 @@ using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Graphics;
namespace osu.Game.Overlays.Options
namespace osu.Game.Overlays.Settings
{
internal class OptionLabel : OptionItem<string>
internal class SettingsLabel : SettingsItem<string>
{
protected override Drawable CreateControl() => null;

View File

@ -13,9 +13,9 @@ using osu.Game.Graphics.Sprites;
using System.Collections.Generic;
using System.Linq;
namespace osu.Game.Overlays.Options
namespace osu.Game.Overlays.Settings
{
public abstract class OptionsSection : Container, IHasFilterableChildren
public abstract class SettingsSection : Container, IHasFilterableChildren
{
protected FillFlowContainer FlowContent;
protected override Container<Drawable> Content => FlowContent;
@ -35,7 +35,7 @@ namespace osu.Game.Overlays.Options
private readonly SpriteText headerLabel;
protected OptionsSection()
protected SettingsSection()
{
Margin = new MarginPadding { Top = 20 };
AutoSizeAxes = Axes.Y;
@ -57,8 +57,8 @@ namespace osu.Game.Overlays.Options
Padding = new MarginPadding
{
Top = 20 + border_size,
Left = OptionsOverlay.CONTENT_MARGINS,
Right = OptionsOverlay.CONTENT_MARGINS,
Left = SettingsOverlay.CONTENT_MARGINS,
Right = SettingsOverlay.CONTENT_MARGINS,
Bottom = 10,
},
RelativeSizeAxes = Axes.X,

View File

@ -6,14 +6,14 @@ using osu.Framework.Graphics.Primitives;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Options
namespace osu.Game.Overlays.Settings
{
public class OptionSlider<T> : OptionSlider<T, OsuSliderBar<T>>
public class SettingsSlider<T> : SettingsSlider<T, OsuSliderBar<T>>
where T : struct
{
}
public class OptionSlider<T, U> : OptionItem<T>
public class SettingsSlider<T, U> : SettingsItem<T>
where T : struct
where U : SliderBar<T>, new()
{

View File

@ -9,9 +9,9 @@ using osu.Game.Graphics.Sprites;
using System.Collections.Generic;
using System.Linq;
namespace osu.Game.Overlays.Options
namespace osu.Game.Overlays.Settings
{
public abstract class OptionsSubsection : FillFlowContainer, IHasFilterableChildren
public abstract class SettingsSubsection : FillFlowContainer, IHasFilterableChildren
{
protected override Container<Drawable> Content => content;
@ -29,7 +29,7 @@ namespace osu.Game.Overlays.Options
}
}
protected OptionsSubsection()
protected SettingsSubsection()
{
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;

View File

@ -4,9 +4,9 @@
using osu.Framework.Graphics;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Options
namespace osu.Game.Overlays.Settings
{
public class OptionTextBox : OptionItem<string>
public class SettingsTextBox : SettingsItem<string>
{
protected override Drawable CreateControl() => new OsuTextBox();
}

View File

@ -10,7 +10,7 @@ using osu.Framework.Input;
using osu.Framework.Threading;
using osu.Game.Overlays.Toolbar;
namespace osu.Game.Overlays.Options
namespace osu.Game.Overlays.Settings
{
public class Sidebar : Container
{

View File

@ -12,7 +12,7 @@ using osu.Framework.Input;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
namespace osu.Game.Overlays.Options
namespace osu.Game.Overlays.Settings
{
public class SidebarButton : Container
{
@ -23,8 +23,8 @@ namespace osu.Game.Overlays.Options
private readonly Container text;
public Action Action;
private OptionsSection section;
public OptionsSection Section
private SettingsSection section;
public SettingsSection Section
{
get
{

View File

@ -8,14 +8,14 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Primitives;
using osu.Framework.Graphics.Sprites;
using osu.Game.Overlays.Options;
using osu.Game.Overlays.Settings;
using System;
using osu.Game.Overlays.Options.Sections;
using osu.Game.Overlays.Settings.Sections;
using osu.Framework.Input;
namespace osu.Game.Overlays
{
public class OptionsOverlay : FocusedOverlayContainer
public class SettingsOverlay : FocusedOverlayContainer
{
internal const float CONTENT_MARGINS = 10;
@ -30,17 +30,17 @@ namespace osu.Game.Overlays
private ScrollContainer scrollContainer;
private Sidebar sidebar;
private SidebarButton[] sidebarButtons;
private OptionsSection[] sections;
private SettingsSection[] sections;
private OptionsHeader header;
private SettingsHeader header;
private OptionsFooter footer;
private SettingsFooter footer;
private SearchContainer searchContainer;
private float lastKnownScroll;
public OptionsOverlay()
public SettingsOverlay()
{
RelativeSizeAxes = Axes.Y;
AutoSizeAxes = Axes.X;
@ -49,7 +49,7 @@ namespace osu.Game.Overlays
[BackgroundDependencyLoader(permitNulls: true)]
private void load(OsuGame game)
{
sections = new OptionsSection[]
sections = new SettingsSection[]
{
new GeneralSection(),
new GraphicsSection(),
@ -84,8 +84,8 @@ namespace osu.Game.Overlays
Direction = FillDirection.Vertical,
Children = sections,
},
footer = new OptionsFooter(),
header = new OptionsHeader(() => scrollContainer.Current)
footer = new SettingsFooter(),
header = new SettingsHeader(() => scrollContainer.Current)
{
Exit = Hide,
},
@ -114,7 +114,7 @@ namespace osu.Game.Overlays
{
base.UpdateAfterChildren();
//we need to update these manually because we can't put the OptionsHeader inside the SearchContainer (due to its anchoring).
//we need to update these manually because we can't put the SettingsHeader inside the SearchContainer (due to its anchoring).
searchContainer.Y = header.DrawHeight;
footer.Y = searchContainer.Y + searchContainer.DrawHeight;
}
@ -128,10 +128,10 @@ namespace osu.Game.Overlays
{
lastKnownScroll = currentScroll;
OptionsSection bestCandidate = null;
SettingsSection bestCandidate = null;
float bestDistance = float.MaxValue;
foreach (OptionsSection section in sections)
foreach (SettingsSection section in sections)
{
float distance = Math.Abs(scrollContainer.GetChildPosInContent(section) - currentScroll);
if (distance < bestDistance)

View File

@ -16,9 +16,9 @@ namespace osu.Game.Overlays.Toolbar
}
[BackgroundDependencyLoader]
private void load(OptionsOverlay options)
private void load(SettingsOverlay settings)
{
StateContainer = options;
StateContainer = settings;
}
}
}

View File

@ -82,7 +82,7 @@ namespace osu.Game.Screens.Menu
AutoSizeAxes = Axes.Both,
Children = new[]
{
settingsButton = new Button(@"settings", @"options", FontAwesome.fa_gear, new Color4(85, 85, 85, 255), () => OnSettings?.Invoke(), -WEDGE_WIDTH, Key.O),
settingsButton = new Button(@"settings", @"settings", FontAwesome.fa_gear, new Color4(85, 85, 85, 255), () => OnSettings?.Invoke(), -WEDGE_WIDTH, Key.O),
backButton = new Button(@"back", @"back", FontAwesome.fa_osu_left_o, new Color4(51, 58, 94, 255), onBack, -WEDGE_WIDTH),
iconFacade = new Container //need a container to make the osu! icon flow properly.
{

View File

@ -64,8 +64,8 @@ namespace osu.Game.Screens.Menu
[BackgroundDependencyLoader]
private void load(AudioManager audio, OsuConfigManager config)
{
menuVoice = config.GetBindable<bool>(OsuConfig.MenuVoice);
menuMusic = config.GetBindable<bool>(OsuConfig.MenuMusic);
menuVoice = config.GetBindable<bool>(OsuSetting.MenuVoice);
menuMusic = config.GetBindable<bool>(OsuSetting.MenuMusic);
bgm = audio.Track.Get(@"circles");
bgm.Looping = true;

View File

@ -66,7 +66,7 @@ namespace osu.Game.Screens.Menu
[BackgroundDependencyLoader]
private void load(OsuGame game, OsuConfigManager config, BeatmapDatabase beatmaps)
{
menuMusic = config.GetBindable<bool>(OsuConfig.MenuMusic);
menuMusic = config.GetBindable<bool>(OsuSetting.MenuMusic);
LoadComponentAsync(background);
if (!menuMusic)
@ -84,7 +84,7 @@ namespace osu.Game.Screens.Menu
}
}
buttons.OnSettings = game.ToggleOptions;
buttons.OnSettings = game.ToggleSettings;
preloadSongSelect();
}

View File

@ -67,7 +67,7 @@ namespace osu.Game.Screens.Play
[BackgroundDependencyLoader(true)]
private void load(OsuConfigManager config, NotificationManager notificationManager)
{
showKeyCounter = config.GetBindable<bool>(OsuConfig.KeyOverlay);
showKeyCounter = config.GetBindable<bool>(OsuSetting.KeyOverlay);
showKeyCounter.ValueChanged += keyCounterVisibility =>
{
if (keyCounterVisibility)
@ -77,7 +77,7 @@ namespace osu.Game.Screens.Play
};
showKeyCounter.TriggerChange();
showHud = config.GetBindable<bool>(OsuConfig.ShowInterface);
showHud = config.GetBindable<bool>(OsuSetting.ShowInterface);
showHud.ValueChanged += hudVisibility =>
{
if (hudVisibility)

View File

@ -79,8 +79,8 @@ namespace osu.Game.Screens.Play
[BackgroundDependencyLoader(permitNulls: true)]
private void load(AudioManager audio, BeatmapDatabase beatmaps, OsuConfigManager config, OsuGame osu)
{
dimLevel = config.GetBindable<double>(OsuConfig.DimLevel);
mouseWheelDisabled = config.GetBindable<bool>(OsuConfig.MouseDisableWheel);
dimLevel = config.GetBindable<double>(OsuSetting.DimLevel);
mouseWheelDisabled = config.GetBindable<bool>(OsuSetting.MouseDisableWheel);
Ruleset rulesetInstance;
@ -138,7 +138,7 @@ namespace osu.Game.Screens.Play
offsetClock = new FramedOffsetClock(decoupledClock);
userAudioOffset = config.GetBindable<double>(OsuConfig.AudioOffset);
userAudioOffset = config.GetBindable<double>(OsuSetting.AudioOffset);
userAudioOffset.ValueChanged += v => offsetClock.Offset = v;
userAudioOffset.TriggerChange();

View File

@ -40,7 +40,7 @@ namespace osu.Game.Screens.Play
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
mouseDisabled = config.GetBindable<bool>(OsuConfig.MouseDisableButtons);
mouseDisabled = config.GetBindable<bool>(OsuSetting.MouseDisableButtons);
}
protected override void LoadComplete()

View File

@ -35,7 +35,7 @@ namespace osu.Game.Screens.Select
{
modsCheckbox.AccentColour = tabs.AccentColour = colour.YellowLight;
selectedTab = config.GetBindable<BeatmapDetailTab>(OsuConfig.BeatmapDetailTab);
selectedTab = config.GetBindable<BeatmapDetailTab>(OsuSetting.BeatmapDetailTab);
tabs.Current.BindTo(selectedTab);
tabs.Current.TriggerChange();

View File

@ -1,9 +1,6 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK;
using OpenTK.Graphics;
using OpenTK.Input;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
@ -12,6 +9,9 @@ using osu.Framework.Graphics.Sprites;
using osu.Framework.Input;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using OpenTK;
using OpenTK.Graphics;
using OpenTK.Input;
namespace osu.Game.Screens.Select.Options
{

View File

@ -4,14 +4,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using OpenTK;
using OpenTK.Graphics;
using OpenTK.Input;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
using OpenTK;
using OpenTK.Graphics;
using OpenTK.Input;
namespace osu.Game.Screens.Select.Options
{

View File

@ -79,8 +79,8 @@
<Compile Include="Overlays\Music\FilterControl.cs" />
<Compile Include="Overlays\Music\PlaylistItem.cs" />
<Compile Include="Overlays\Music\PlaylistList.cs" />
<Compile Include="Overlays\Options\OptionsHeader.cs" />
<Compile Include="Overlays\Options\Sections\Audio\MainMenuOptions.cs" />
<Compile Include="Overlays\Settings\SettingsHeader.cs" />
<Compile Include="Overlays\Settings\Sections\Audio\MainMenuSettings.cs" />
<Compile Include="Overlays\Toolbar\ToolbarChatButton.cs" />
<Compile Include="Rulesets\Beatmaps\BeatmapConverter.cs" />
<Compile Include="Rulesets\Beatmaps\BeatmapProcessor.cs" />
@ -207,13 +207,13 @@
<Compile Include="Overlays\Notifications\ProgressCompletionNotification.cs" />
<Compile Include="Overlays\Notifications\ProgressNotification.cs" />
<Compile Include="Overlays\Notifications\SimpleNotification.cs" />
<Compile Include="Overlays\Options\OptionDropdown.cs" />
<Compile Include="Overlays\Options\OptionLabel.cs" />
<Compile Include="Overlays\Settings\SettingsDropdown.cs" />
<Compile Include="Overlays\Settings\SettingsLabel.cs" />
<Compile Include="Graphics\UserInterface\OsuDropdown.cs" />
<Compile Include="Overlays\Options\OptionsFooter.cs" />
<Compile Include="Overlays\Options\Sections\DebugSection.cs" />
<Compile Include="Overlays\Options\Sections\Debug\GeneralOptions.cs" />
<Compile Include="Overlays\Options\Sections\Debug\GCOptions.cs" />
<Compile Include="Overlays\Settings\SettingsFooter.cs" />
<Compile Include="Overlays\Settings\Sections\DebugSection.cs" />
<Compile Include="Overlays\Settings\Sections\Debug\GeneralSettings.cs" />
<Compile Include="Overlays\Settings\Sections\Debug\GCSettings.cs" />
<Compile Include="Overlays\Toolbar\ToolbarHomeButton.cs" />
<Compile Include="Overlays\Toolbar\ToolbarMusicButton.cs" />
<Compile Include="Overlays\Toolbar\ToolbarNotificationButton.cs" />
@ -278,6 +278,8 @@
<Compile Include="Rulesets\Ruleset.cs" />
<Compile Include="Screens\Ranking\Results.cs" />
<Compile Include="Screens\Direct\OnlineListing.cs" />
<Compile Include="Screens\Select\Options\BeatmapOptionsButton.cs" />
<Compile Include="Screens\Select\Options\BeatmapOptionsOverlay.cs" />
<Compile Include="Screens\Select\PlaySongSelect.cs" />
<Compile Include="Screens\Select\SongSelect.cs" />
<Compile Include="Rulesets\UI\HitRenderer.cs" />
@ -313,7 +315,7 @@
<Compile Include="OsuGame.cs" />
<Compile Include="OsuGameBase.cs" />
<Compile Include="Overlays\ChatOverlay.cs" />
<Compile Include="Overlays\OptionsOverlay.cs" />
<Compile Include="Overlays\SettingsOverlay.cs" />
<Compile Include="Overlays\Toolbar\Toolbar.cs" />
<Compile Include="Overlays\Toolbar\ToolbarButton.cs" />
<Compile Include="Overlays\Toolbar\ToolbarModeButton.cs" />
@ -346,39 +348,39 @@
<Compile Include="Database\BeatmapDifficulty.cs" />
<Compile Include="Database\DatabaseWorkingBeatmap.cs" />
<Compile Include="Graphics\UserInterface\OsuButton.cs" />
<Compile Include="Overlays\Options\Sections\MaintenanceSection.cs" />
<Compile Include="Overlays\Options\OptionsSection.cs" />
<Compile Include="Overlays\Options\OptionsSubsection.cs" />
<Compile Include="Overlays\Settings\Sections\MaintenanceSection.cs" />
<Compile Include="Overlays\Settings\SettingsSection.cs" />
<Compile Include="Overlays\Settings\SettingsSubsection.cs" />
<Compile Include="Graphics\UserInterface\LoadingAnimation.cs" />
<Compile Include="Overlays\Options\Sidebar.cs" />
<Compile Include="Overlays\Options\Sections\GeneralSection.cs" />
<Compile Include="Overlays\Options\Sections\General\LoginOptions.cs" />
<Compile Include="Overlays\Options\Sections\General\UpdateOptions.cs" />
<Compile Include="Overlays\Options\Sections\General\LanguageOptions.cs" />
<Compile Include="Overlays\Options\Sections\GraphicsSection.cs" />
<Compile Include="Overlays\Options\Sections\Graphics\RendererOptions.cs" />
<Compile Include="Overlays\Options\Sections\Graphics\LayoutOptions.cs" />
<Compile Include="Overlays\Options\Sections\Graphics\DetailOptions.cs" />
<Compile Include="Overlays\Options\Sections\Graphics\MainMenuOptions.cs" />
<Compile Include="Overlays\Options\Sections\GameplaySection.cs" />
<Compile Include="Overlays\Options\Sections\Gameplay\GeneralOptions.cs" />
<Compile Include="Overlays\Options\Sections\Gameplay\SongSelectOptions.cs" />
<Compile Include="Overlays\Options\Sections\AudioSection.cs" />
<Compile Include="Overlays\Options\Sections\Audio\AudioDevicesOptions.cs" />
<Compile Include="Overlays\Options\Sections\Audio\VolumeOptions.cs" />
<Compile Include="Overlays\Options\Sections\Audio\OffsetOptions.cs" />
<Compile Include="Overlays\Options\Sections\InputSection.cs" />
<Compile Include="Overlays\Options\Sections\Input\MouseOptions.cs" />
<Compile Include="Overlays\Options\Sections\Input\KeyboardOptions.cs" />
<Compile Include="Overlays\Options\Sections\OnlineSection.cs" />
<Compile Include="Overlays\Options\Sections\SkinSection.cs" />
<Compile Include="Overlays\Settings\Sidebar.cs" />
<Compile Include="Overlays\Settings\Sections\GeneralSection.cs" />
<Compile Include="Overlays\Settings\Sections\General\LoginSettings.cs" />
<Compile Include="Overlays\Settings\Sections\General\UpdateSettings.cs" />
<Compile Include="Overlays\Settings\Sections\General\LanguageSettings.cs" />
<Compile Include="Overlays\Settings\Sections\GraphicsSection.cs" />
<Compile Include="Overlays\Settings\Sections\Graphics\RendererSettings.cs" />
<Compile Include="Overlays\Settings\Sections\Graphics\LayoutSettings.cs" />
<Compile Include="Overlays\Settings\Sections\Graphics\DetailSettings.cs" />
<Compile Include="Overlays\Settings\Sections\Graphics\MainMenuSettings.cs" />
<Compile Include="Overlays\Settings\Sections\GameplaySection.cs" />
<Compile Include="Overlays\Settings\Sections\Gameplay\GeneralSettings.cs" />
<Compile Include="Overlays\Settings\Sections\Gameplay\SongSelectSettings.cs" />
<Compile Include="Overlays\Settings\Sections\AudioSection.cs" />
<Compile Include="Overlays\Settings\Sections\Audio\AudioDevicesSettings.cs" />
<Compile Include="Overlays\Settings\Sections\Audio\VolumeSettings.cs" />
<Compile Include="Overlays\Settings\Sections\Audio\OffsetSettings.cs" />
<Compile Include="Overlays\Settings\Sections\InputSection.cs" />
<Compile Include="Overlays\Settings\Sections\Input\MouseSettings.cs" />
<Compile Include="Overlays\Settings\Sections\Input\KeyboardSettings.cs" />
<Compile Include="Overlays\Settings\Sections\OnlineSection.cs" />
<Compile Include="Overlays\Settings\Sections\SkinSection.cs" />
<Compile Include="Graphics\UserInterface\OsuCheckbox.cs" />
<Compile Include="Overlays\Options\SidebarButton.cs" />
<Compile Include="Overlays\Options\OptionCheckbox.cs" />
<Compile Include="Overlays\Options\OptionTextBox.cs" />
<Compile Include="Overlays\Options\OptionSlider.cs" />
<Compile Include="Overlays\Options\OptionItem.cs" />
<Compile Include="Overlays\Options\OptionEnumDropdown.cs" />
<Compile Include="Overlays\Settings\SidebarButton.cs" />
<Compile Include="Overlays\Settings\SettingsCheckbox.cs" />
<Compile Include="Overlays\Settings\SettingsTextBox.cs" />
<Compile Include="Overlays\Settings\SettingsSlider.cs" />
<Compile Include="Overlays\Settings\SettingsItem.cs" />
<Compile Include="Overlays\Settings\SettingsEnumDropdown.cs" />
<Compile Include="Configuration\RankingType.cs" />
<Compile Include="Configuration\ScoreMeterType.cs" />
<Compile Include="Configuration\ReleaseStream.cs" />
@ -410,8 +412,6 @@
<Compile Include="Overlays\DialogOverlay.cs" />
<Compile Include="Overlays\Mods\AssistedSection.cs" />
<Compile Include="Overlays\WaveOverlayContainer.cs" />
<Compile Include="Screens\Select\Options\BeatmapOptionsButton.cs" />
<Compile Include="Screens\Select\Options\BeatmapOptionsOverlay.cs" />
<Compile Include="Screens\Select\Leaderboards\Leaderboard.cs" />
<Compile Include="Screens\Select\Leaderboards\LeaderboardScore.cs" />
<Compile Include="Users\Country.cs" />