From 116e92a5423ce66a774f7a0b490ea3fd34594269 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 2 May 2017 17:00:30 +0900 Subject: [PATCH 01/11] Remove silly platform specific logic. --- osu.Game/Overlays/Options/Sections/AudioSection.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Overlays/Options/Sections/AudioSection.cs b/osu.Game/Overlays/Options/Sections/AudioSection.cs index 1412fdea34..3de2bb4901 100644 --- a/osu.Game/Overlays/Options/Sections/AudioSection.cs +++ b/osu.Game/Overlays/Options/Sections/AudioSection.cs @@ -17,7 +17,7 @@ namespace osu.Game.Overlays.Options.Sections { Children = new Drawable[] { - new AudioDevicesOptions { Alpha = RuntimeInfo.IsWindows ? 1 : 0 }, + new AudioDevicesOptions(), new VolumeOptions(), new OffsetOptions(), }; From bef15fe6375025990123c1197fe51db8a487be6d Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 2 May 2017 17:45:22 +0900 Subject: [PATCH 02/11] Improve organisation of some options and config code. --- osu.Game/Configuration/OsuConfigManager.cs | 69 ++++++++++--------- .../Options/Sections/Audio/MainMenuOptions.cs | 32 +++++++++ .../Overlays/Options/Sections/AudioSection.cs | 2 +- .../Sections/Graphics/MainMenuOptions.cs | 10 --- osu.Game/osu.Game.csproj | 1 + 5 files changed, 72 insertions(+), 42 deletions(-) create mode 100644 osu.Game/Overlays/Options/Sections/Audio/MainMenuOptions.cs diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index 30cd31c113..91652e8ef4 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -12,42 +12,61 @@ namespace osu.Game.Configuration { protected override void InitialiseDefaults() { -#pragma warning disable CS0612 // Type or member is obsolete + // UI/selection defaults + + Set(OsuConfig.Ruleset, 0, 0, int.MaxValue); + Set(OsuConfig.BeatmapDetailTab, BeatmapDetailTab.Details); + + // Online settings Set(OsuConfig.Username, string.Empty); Set(OsuConfig.Token, string.Empty); - Set(OsuConfig.Ruleset, 0, 0, int.MaxValue); + Set(OsuConfig.SavePassword, false).ValueChanged += delegate + { + if (Get(OsuConfig.SavePassword)) Set(OsuConfig.SaveUsername, true); + }; + + Set(OsuConfig.SaveUsername, true).ValueChanged += delegate + { + if (!Get(OsuConfig.SaveUsername)) Set(OsuConfig.SavePassword, false); + }; + + // Audio Set(OsuConfig.AudioDevice, string.Empty); - Set(OsuConfig.SavePassword, false); - Set(OsuConfig.SaveUsername, true); - - Set(OsuConfig.MenuCursorSize, 1.0, 0.5f, 2); - Set(OsuConfig.GameplayCursorSize, 1.0, 0.5f, 2); - Set(OsuConfig.DimLevel, 0.3, 0, 1); - - Set(OsuConfig.MouseDisableButtons, false); - Set(OsuConfig.MouseDisableWheel, false); - - Set(OsuConfig.SnakingInSliders, true); - Set(OsuConfig.SnakingOutSliders, true); - - Set(OsuConfig.MenuParallax, true); Set(OsuConfig.MenuVoice, true); Set(OsuConfig.MenuMusic, true); - Set(OsuConfig.BeatmapDetailTab, BeatmapDetailTab.Details); + Set(OsuConfig.AudioOffset, 0, -500.0, 500.0); + + // Input + + Set(OsuConfig.MenuCursorSize, 1.0, 0.5f, 2); + Set(OsuConfig.GameplayCursorSize, 1.0, 0.5f, 2); + + Set(OsuConfig.MouseDisableButtons, false); + Set(OsuConfig.MouseDisableWheel, false); + + // Graphics + + Set(OsuConfig.MenuParallax, true); + + Set(OsuConfig.SnakingInSliders, true); + Set(OsuConfig.SnakingOutSliders, true); + + // Gameplay + + Set(OsuConfig.DimLevel, 0.3, 0, 1); Set(OsuConfig.ShowInterface, true); Set(OsuConfig.KeyOverlay, false); //todo: implement all settings below this line (remove the Disabled set when doing so). - Set(OsuConfig.AudioOffset, 0, -500.0, 500.0); Set(OsuConfig.MouseSpeed, 1.0).Disabled = true; - Set(OsuConfig.BeatmapDirectory, @"Songs").Disabled = true; // TODO: use thi.Disabled = trues + Set(OsuConfig.BeatmapDirectory, @"Songs").Disabled = true; Set(OsuConfig.AllowPublicInvites, true).Disabled = true; Set(OsuConfig.AutoChatHide, true).Disabled = true; Set(OsuConfig.AutomaticDownload, true).Disabled = true; @@ -166,18 +185,6 @@ namespace osu.Game.Configuration Set(OsuConfig.Ticker, false).Disabled = true; Set(OsuConfig.CompatibilityContext, false).Disabled = true; Set(OsuConfig.CanForceOptimusCompatibility, true).Disabled = true; - Set(OsuConfig.ConfineMouse, Get(OsuConfig.ConfineMouseToFullscreen) ? - ConfineMouseMode.Fullscreen : ConfineMouseMode.Never).Disabled = true; - - GetOriginalBindable(OsuConfig.SavePassword).ValueChanged += delegate - { - if (Get(OsuConfig.SavePassword)) Set(OsuConfig.SaveUsername, true); - }; - GetOriginalBindable(OsuConfig.SaveUsername).ValueChanged += delegate - { - if (!Get(OsuConfig.SaveUsername)) Set(OsuConfig.SavePassword, false); - }; -#pragma warning restore CS0612 // Type or member is obsolete } public OsuConfigManager(Storage storage) : base(storage) diff --git a/osu.Game/Overlays/Options/Sections/Audio/MainMenuOptions.cs b/osu.Game/Overlays/Options/Sections/Audio/MainMenuOptions.cs new file mode 100644 index 0000000000..9de74e1b02 --- /dev/null +++ b/osu.Game/Overlays/Options/Sections/Audio/MainMenuOptions.cs @@ -0,0 +1,32 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Framework.Allocation; +using osu.Game.Configuration; +using osu.Game.Graphics.UserInterface; + +namespace osu.Game.Overlays.Options.Sections.Audio +{ + public class MainMenuOptions : OptionsSubsection + { + protected override string Header => "Main Menu"; + + [BackgroundDependencyLoader] + private void load(OsuConfigManager config) + { + Children = new[] + { + new OsuCheckbox + { + LabelText = "Interface voices", + Bindable = config.GetBindable(OsuConfig.MenuVoice) + }, + new OsuCheckbox + { + LabelText = "osu! music theme", + Bindable = config.GetBindable(OsuConfig.MenuMusic) + }, + }; + } + } +} \ No newline at end of file diff --git a/osu.Game/Overlays/Options/Sections/AudioSection.cs b/osu.Game/Overlays/Options/Sections/AudioSection.cs index 3de2bb4901..a9f8265a68 100644 --- a/osu.Game/Overlays/Options/Sections/AudioSection.cs +++ b/osu.Game/Overlays/Options/Sections/AudioSection.cs @@ -1,7 +1,6 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework; using osu.Framework.Graphics; using osu.Game.Graphics; using osu.Game.Overlays.Options.Sections.Audio; @@ -20,6 +19,7 @@ namespace osu.Game.Overlays.Options.Sections new AudioDevicesOptions(), new VolumeOptions(), new OffsetOptions(), + new MainMenuOptions(), }; } } diff --git a/osu.Game/Overlays/Options/Sections/Graphics/MainMenuOptions.cs b/osu.Game/Overlays/Options/Sections/Graphics/MainMenuOptions.cs index c5000d8547..13683edb32 100644 --- a/osu.Game/Overlays/Options/Sections/Graphics/MainMenuOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Graphics/MainMenuOptions.cs @@ -31,16 +31,6 @@ namespace osu.Game.Overlays.Options.Sections.Graphics LabelText = "Menu tips", Bindable = config.GetBindable(OsuConfig.ShowMenuTips) }, - new OsuCheckbox - { - LabelText = "Interface voices", - Bindable = config.GetBindable(OsuConfig.MenuVoice) - }, - new OsuCheckbox - { - LabelText = "osu! music theme", - Bindable = config.GetBindable(OsuConfig.MenuMusic) - }, }; } } diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 2a1195135a..fb364ccdf5 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -78,6 +78,7 @@ + From 1b0f353af3fc400b11abaa21b7eb1c698c9bbd48 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 2 May 2017 17:45:42 +0900 Subject: [PATCH 03/11] Add support for framework-level mouse confining. --- osu.Desktop.VisualTests/VisualTestGame.cs | 2 +- osu.Desktop/OsuGameDesktop.cs | 2 +- osu.Game/Configuration/ConfineMouseMode.cs | 12 ---------- .../Options/Sections/Input/MouseOptions.cs | 22 ++++++++++--------- osu.Game/osu.Game.csproj | 1 - 5 files changed, 14 insertions(+), 25 deletions(-) delete mode 100644 osu.Game/Configuration/ConfineMouseMode.cs diff --git a/osu.Desktop.VisualTests/VisualTestGame.cs b/osu.Desktop.VisualTests/VisualTestGame.cs index e0d168390b..5c5bcd9e21 100644 --- a/osu.Desktop.VisualTests/VisualTestGame.cs +++ b/osu.Desktop.VisualTests/VisualTestGame.cs @@ -29,7 +29,7 @@ namespace osu.Desktop.VisualTests host.DrawThread.InactiveHz = host.DrawThread.ActiveHz; host.InputThread.InactiveHz = host.InputThread.ActiveHz; - host.Window.CursorState = CursorState.Hidden; + host.Window.CursorState |= CursorState.Hidden; } } } diff --git a/osu.Desktop/OsuGameDesktop.cs b/osu.Desktop/OsuGameDesktop.cs index c2bb39ac4a..299f64d998 100644 --- a/osu.Desktop/OsuGameDesktop.cs +++ b/osu.Desktop/OsuGameDesktop.cs @@ -43,7 +43,7 @@ namespace osu.Desktop var desktopWindow = host.Window as DesktopGameWindow; if (desktopWindow != null) { - desktopWindow.CursorState = CursorState.Hidden; + desktopWindow.CursorState |= CursorState.Hidden; desktopWindow.Icon = Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location); desktopWindow.Title = Name; diff --git a/osu.Game/Configuration/ConfineMouseMode.cs b/osu.Game/Configuration/ConfineMouseMode.cs deleted file mode 100644 index 527f26cf6b..0000000000 --- a/osu.Game/Configuration/ConfineMouseMode.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -namespace osu.Game.Configuration -{ - public enum ConfineMouseMode - { - Never, - Fullscreen, - Always - } -} \ No newline at end of file diff --git a/osu.Game/Overlays/Options/Sections/Input/MouseOptions.cs b/osu.Game/Overlays/Options/Sections/Input/MouseOptions.cs index 4a48c9ec86..27b8159d63 100644 --- a/osu.Game/Overlays/Options/Sections/Input/MouseOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Input/MouseOptions.cs @@ -2,7 +2,9 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.Allocation; +using osu.Framework.Configuration; using osu.Framework.Graphics; +using osu.Framework.Input; using osu.Game.Configuration; using osu.Game.Graphics.UserInterface; @@ -13,44 +15,44 @@ namespace osu.Game.Overlays.Options.Sections.Input protected override string Header => "Mouse"; [BackgroundDependencyLoader] - private void load(OsuConfigManager config) + private void load(OsuConfigManager osuConfig, FrameworkConfigManager config) { Children = new Drawable[] { new OptionSlider { LabelText = "Sensitivity", - Bindable = config.GetBindable(OsuConfig.MouseSpeed) + Bindable = osuConfig.GetBindable(OsuConfig.MouseSpeed) }, new OsuCheckbox { LabelText = "Raw input", - Bindable = config.GetBindable(OsuConfig.RawInput) + Bindable = osuConfig.GetBindable(OsuConfig.RawInput) }, new OsuCheckbox { LabelText = "Map absolute raw input to the osu! window", - Bindable = config.GetBindable(OsuConfig.AbsoluteToOsuWindow) + Bindable = osuConfig.GetBindable(OsuConfig.AbsoluteToOsuWindow) }, new OptionEnumDropdown { LabelText = "Confine mouse cursor", - Bindable = config.GetBindable(OsuConfig.ConfineMouse), + Bindable = config.GetBindable(FrameworkConfig.ConfineMouseMode), }, new OsuCheckbox { - LabelText = "Disable mouse wheel in play mode", - Bindable = config.GetBindable(OsuConfig.MouseDisableWheel) + LabelText = "Disable mouse wheel during gameplay", + Bindable = osuConfig.GetBindable(OsuConfig.MouseDisableWheel) }, new OsuCheckbox { - LabelText = "Disable mouse buttons in play mode", - Bindable = config.GetBindable(OsuConfig.MouseDisableButtons) + LabelText = "Disable mouse buttons during gameplay", + Bindable = osuConfig.GetBindable(OsuConfig.MouseDisableButtons) }, new OsuCheckbox { LabelText = "Cursor ripples", - Bindable = config.GetBindable(OsuConfig.CursorRipple) + Bindable = osuConfig.GetBindable(OsuConfig.CursorRipple) }, }; } diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index fb364ccdf5..7b034c2838 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -385,7 +385,6 @@ - From 57c2dd1f49c26ce19cd21a10e5c18b78b835d7d0 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 2 May 2017 18:35:23 +0900 Subject: [PATCH 04/11] Fix options dropdown labels never being displayed. --- osu.Game/Overlays/Options/OptionDropdown.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/osu.Game/Overlays/Options/OptionDropdown.cs b/osu.Game/Overlays/Options/OptionDropdown.cs index 8642b132df..6837e71c2c 100644 --- a/osu.Game/Overlays/Options/OptionDropdown.cs +++ b/osu.Game/Overlays/Options/OptionDropdown.cs @@ -24,6 +24,7 @@ namespace osu.Game.Overlays.Options set { text.Text = value; + text.Alpha = !string.IsNullOrEmpty(value) ? 1 : 0; } } From d4045ee2c095467dee0fdb247e8da42b136a60e5 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 2 May 2017 18:40:30 +0900 Subject: [PATCH 05/11] We only have one release stream, so let's unlock it. --- osu.Game/Configuration/OsuConfigManager.cs | 7 +++++-- .../Overlays/Options/Sections/General/UpdateOptions.cs | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index 91652e8ef4..0e4c987e5c 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -56,13 +56,17 @@ namespace osu.Game.Configuration Set(OsuConfig.SnakingInSliders, true); Set(OsuConfig.SnakingOutSliders, true); - // Gameplay + // Gameplay Set(OsuConfig.DimLevel, 0.3, 0, 1); Set(OsuConfig.ShowInterface, true); Set(OsuConfig.KeyOverlay, false); + // Update + + Set(OsuConfig.ReleaseStream, ReleaseStream.Lazer); + //todo: implement all settings below this line (remove the Disabled set when doing so). Set(OsuConfig.MouseSpeed, 1.0).Disabled = true; @@ -177,7 +181,6 @@ namespace osu.Game.Configuration Set(OsuConfig.AlternativeChatFont, false).Disabled = true; Set(OsuConfig.DisplayStarsMaximum, 10.0, 0.0, 10.0).Disabled = true; Set(OsuConfig.DisplayStarsMinimum, 0.0, 0.0, 10.0).Disabled = true; - Set(OsuConfig.ReleaseStream, ReleaseStream.Lazer).Disabled = true; Set(OsuConfig.UpdateFailCount, 0).Disabled = true; //Set(OsuConfig.TreeSortMode, TreeGroupMode.Show_All).Disabled = true; //Set(OsuConfig.TreeSortMode2, TreeSortMode.Title).Disabled = true; diff --git a/osu.Game/Overlays/Options/Sections/General/UpdateOptions.cs b/osu.Game/Overlays/Options/Sections/General/UpdateOptions.cs index 2b2939e432..1d9a5a7d72 100644 --- a/osu.Game/Overlays/Options/Sections/General/UpdateOptions.cs +++ b/osu.Game/Overlays/Options/Sections/General/UpdateOptions.cs @@ -23,7 +23,6 @@ namespace osu.Game.Overlays.Options.Sections.General LabelText = "Release stream", Bindable = config.GetBindable(OsuConfig.ReleaseStream), }, - new OptionLabel { Text = "Your osu! is up to date" }, // TODO: map this to reality new OsuButton { RelativeSizeAxes = Axes.X, From f9de7331285a4c2add1a83f5466a5f6f16b11729 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 2 May 2017 18:53:33 +0900 Subject: [PATCH 06/11] Formatting. --- osu.Game/Overlays/Options/OptionSlider.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/osu.Game/Overlays/Options/OptionSlider.cs b/osu.Game/Overlays/Options/OptionSlider.cs index 42bf4170fa..2d98bc991a 100644 --- a/osu.Game/Overlays/Options/OptionSlider.cs +++ b/osu.Game/Overlays/Options/OptionSlider.cs @@ -12,11 +12,14 @@ using osu.Game.Graphics.UserInterface; namespace osu.Game.Overlays.Options { - public class OptionSlider : OptionSlider> where T: struct + public class OptionSlider : OptionSlider> + where T : struct { } - public class OptionSlider : FillFlowContainer where T : struct where U : SliderBar, new() + public class OptionSlider : FillFlowContainer + where T : struct + where U : SliderBar, new() { private readonly SliderBar slider; private readonly SpriteText text; From 691742b8282cb81a5938259787a3882133636fe4 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 2 May 2017 19:40:30 +0900 Subject: [PATCH 07/11] Remove most options which have not yet been implemented. --- osu.Game/Configuration/OsuConfigManager.cs | 256 +----------------- osu.Game/Configuration/ProgressBarType.cs | 18 -- .../Options/Sections/Audio/VolumeOptions.cs | 9 +- .../Options/Sections/EditorSection.cs | 58 ---- .../Sections/Gameplay/GeneralOptions.cs | 30 -- .../Sections/General/LanguageOptions.cs | 9 +- .../Sections/Graphics/DetailOptions.cs | 35 --- .../Sections/Graphics/LayoutOptions.cs | 1 - .../Sections/Graphics/MainMenuOptions.cs | 12 +- .../Sections/Graphics/RendererOptions.cs | 19 +- .../Graphics/SongSelectGraphicsOptions.cs | 27 -- .../Options/Sections/GraphicsSection.cs | 1 - .../Options/Sections/Input/KeyboardOptions.cs | 7 +- .../Options/Sections/Input/MouseOptions.cs | 20 -- .../Sections/Input/OtherInputOptions.cs | 34 --- .../Overlays/Options/Sections/InputSection.cs | 1 - .../Options/Sections/MaintenanceSection.cs | 22 +- .../Sections/Online/InGameChatOptions.cs | 53 ---- .../Sections/Online/IntegrationOptions.cs | 43 --- .../Sections/Online/NotificationsOptions.cs | 53 ---- .../Options/Sections/Online/PrivacyOptions.cs | 33 --- .../Options/Sections/OnlineSection.cs | 5 - .../Overlays/Options/Sections/SkinSection.cs | 42 --- osu.Game/Overlays/OptionsOverlay.cs | 1 - osu.Game/osu.Game.csproj | 8 - 25 files changed, 13 insertions(+), 784 deletions(-) delete mode 100644 osu.Game/Configuration/ProgressBarType.cs delete mode 100644 osu.Game/Overlays/Options/Sections/EditorSection.cs delete mode 100644 osu.Game/Overlays/Options/Sections/Graphics/SongSelectGraphicsOptions.cs delete mode 100644 osu.Game/Overlays/Options/Sections/Input/OtherInputOptions.cs delete mode 100644 osu.Game/Overlays/Options/Sections/Online/InGameChatOptions.cs delete mode 100644 osu.Game/Overlays/Options/Sections/Online/IntegrationOptions.cs delete mode 100644 osu.Game/Overlays/Options/Sections/Online/NotificationsOptions.cs delete mode 100644 osu.Game/Overlays/Options/Sections/Online/PrivacyOptions.cs diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index 0e4c987e5c..1fcb33b248 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -1,7 +1,6 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; using osu.Framework.Configuration; using osu.Framework.Platform; using osu.Game.Screens.Select; @@ -17,6 +16,9 @@ namespace osu.Game.Configuration Set(OsuConfig.Ruleset, 0, 0, int.MaxValue); Set(OsuConfig.BeatmapDetailTab, BeatmapDetailTab.Details); + Set(OsuConfig.DisplayStarsMinimum, 0.0, 0, 10); + Set(OsuConfig.DisplayStarsMaximum, 10.0, 0, 10); + // Online settings Set(OsuConfig.Username, string.Empty); @@ -66,128 +68,6 @@ namespace osu.Game.Configuration // Update Set(OsuConfig.ReleaseStream, ReleaseStream.Lazer); - - //todo: implement all settings below this line (remove the Disabled set when doing so). - - Set(OsuConfig.MouseSpeed, 1.0).Disabled = true; - Set(OsuConfig.BeatmapDirectory, @"Songs").Disabled = true; - Set(OsuConfig.AllowPublicInvites, true).Disabled = true; - Set(OsuConfig.AutoChatHide, true).Disabled = true; - Set(OsuConfig.AutomaticDownload, true).Disabled = true; - Set(OsuConfig.AutomaticDownloadNoVideo, false).Disabled = true; - Set(OsuConfig.BlockNonFriendPM, false).Disabled = true; - Set(OsuConfig.Bloom, false).Disabled = true; - Set(OsuConfig.BloomSoftening, false).Disabled = true; - Set(OsuConfig.BossKeyFirstActivation, true).Disabled = true; - Set(OsuConfig.ChatAudibleHighlight, true).Disabled = true; - Set(OsuConfig.ChatChannels, string.Empty).Disabled = true; - Set(OsuConfig.ChatFilter, false).Disabled = true; - Set(OsuConfig.ChatHighlightName, true).Disabled = true; - Set(OsuConfig.ChatMessageNotification, true).Disabled = true; - Set(OsuConfig.ChatLastChannel, string.Empty).Disabled = true; - Set(OsuConfig.ChatRemoveForeign, false).Disabled = true; - //Set(OsuConfig.ChatSortMode, UserSortMode.Rank).Disabled = true; - Set(OsuConfig.ComboBurst, true).Disabled = true; - Set(OsuConfig.ComboFire, false).Disabled = true; - Set(OsuConfig.ComboFireHeight, 3).Disabled = true; - Set(OsuConfig.ConfirmExit, false).Disabled = true; - Set(OsuConfig.AutoSendNowPlaying, true).Disabled = true; - Set(OsuConfig.AutomaticCursorSizing, false).Disabled = true; - Set(OsuConfig.Display, 1).Disabled = true; - Set(OsuConfig.DisplayCityLocation, false).Disabled = true; - Set(OsuConfig.DistanceSpacingEnabled, true).Disabled = true; - Set(OsuConfig.EditorTip, 0).Disabled = true; - Set(OsuConfig.VideoEditor, true).Disabled = true; - Set(OsuConfig.EditorDefaultSkin, false).Disabled = true; - Set(OsuConfig.EditorSnakingSliders, true).Disabled = true; - Set(OsuConfig.EditorHitAnimations, false).Disabled = true; - Set(OsuConfig.EditorFollowPoints, true).Disabled = true; - Set(OsuConfig.EditorStacking, true).Disabled = true; - Set(OsuConfig.ForceSliderRendering, false).Disabled = true; - Set(OsuConfig.FpsCounter, false).Disabled = true; - Set(OsuConfig.FrameTimeDisplay, false).Disabled = true; - Set(OsuConfig.GuideTips, @"").Disabled = true; - Set(OsuConfig.CursorRipple, false).Disabled = true; - Set(OsuConfig.HighlightWords, string.Empty).Disabled = true; - Set(OsuConfig.HighResolution, false).Disabled = true; - Set(OsuConfig.HitLighting, true).Disabled = true; - Set(OsuConfig.IgnoreBarline, false).Disabled = true; - Set(OsuConfig.IgnoreBeatmapSamples, false).Disabled = true; - Set(OsuConfig.IgnoreBeatmapSkins, false).Disabled = true; - Set(OsuConfig.IgnoreList, string.Empty).Disabled = true; - Set(OsuConfig.AllowNowPlayingHighlights, false).Disabled = true; - Set(OsuConfig.LastVersion, string.Empty).Disabled = true; - Set(OsuConfig.LastVersionPermissionsFailed, string.Empty).Disabled = true; - Set(OsuConfig.LoadSubmittedThread, true).Disabled = true; - Set(OsuConfig.LobbyPlayMode, -1).Disabled = true; - Set(OsuConfig.ShowInterfaceDuringRelax, false).Disabled = true; - Set(OsuConfig.LobbyShowExistingOnly, false).Disabled = true; - Set(OsuConfig.LobbyShowFriendsOnly, false).Disabled = true; - Set(OsuConfig.LobbyShowFull, false).Disabled = true; - Set(OsuConfig.LobbyShowInProgress, true).Disabled = true; - Set(OsuConfig.LobbyShowPassworded, true).Disabled = true; - Set(OsuConfig.LogPrivateMessages, false).Disabled = true; - Set(OsuConfig.LowResolution, false).Disabled = true; - //Set(OsuConfig.ManiaSpeed, SpeedMania.SPEED_DEFAULT, SpeedMania.SPEED_MIN, SpeedMania.SPEED_MAX).Disabled = true; - Set(OsuConfig.UsePerBeatmapManiaSpeed, true).Disabled = true; - Set(OsuConfig.ManiaSpeedBPMScale, true).Disabled = true; - Set(OsuConfig.MenuTip, 0).Disabled = true; - Set(OsuConfig.MouseSpeed, 1, 0.4, 6).Disabled = true; - Set(OsuConfig.ScoreMeterScale, 1, 0.5, 2).Disabled = true; - //Set(OsuConfig.ScoreMeterScale, 1, 0.5, OsuGame.Tournament ? 10 : 2).Disabled = true; - Set(OsuConfig.DistanceSpacing, 0.8, 0.1, 6).Disabled = true; - Set(OsuConfig.EditorBeatDivisor, 1, 1, 16).Disabled = true; - Set(OsuConfig.EditorGridSize, 32, 4, 32).Disabled = true; - Set(OsuConfig.EditorGridSizeDesign, 32, 4, 32).Disabled = true; - Set(OsuConfig.CustomFrameLimit, 240, 240, 999).Disabled = true; - Set(OsuConfig.MsnIntegration, false).Disabled = true; - Set(OsuConfig.MyPcSucks, false).Disabled = true; - Set(OsuConfig.NotifyFriends, true).Disabled = true; - Set(OsuConfig.NotifySubmittedThread, true).Disabled = true; - Set(OsuConfig.PopupDuringGameplay, true).Disabled = true; - Set(OsuConfig.ProgressBarType, ProgressBarType.Pie).Disabled = true; - Set(OsuConfig.RankType, RankingType.Top).Disabled = true; - Set(OsuConfig.RefreshRate, 60).Disabled = true; - Set(OsuConfig.OverrideRefreshRate, Get(OsuConfig.RefreshRate) != 60).Disabled = true; - //Set(OsuConfig.ScaleMode, ScaleMode.WidescreenConservative).Disabled = true; - Set(OsuConfig.ScoreboardVisible, true).Disabled = true; - Set(OsuConfig.ScoreMeter, ScoreMeterType.Error).Disabled = true; - //Set(OsuConfig.ScoreMeter, OsuGame.Tournament ? ScoreMeterType.Colour : ScoreMeterType.Error).Disabled = true; - Set(OsuConfig.ScreenshotId, 0).Disabled = true; - Set(OsuConfig.MenuSnow, false).Disabled = true; - Set(OsuConfig.MenuTriangles, true).Disabled = true; - Set(OsuConfig.SongSelectThumbnails, true).Disabled = true; - Set(OsuConfig.ScreenshotFormat, ScreenshotFormat.Jpg).Disabled = true; - Set(OsuConfig.ShowReplayComments, true).Disabled = true; - Set(OsuConfig.ShowSpectators, true).Disabled = true; - Set(OsuConfig.ShowStoryboard, true).Disabled = true; - //Set(OsuConfig.Skin, SkinManager.DEFAULT_SKIN).Disabled = true; - Set(OsuConfig.SkinSamples, true).Disabled = true; - Set(OsuConfig.SkipTablet, false).Disabled = true; - Set(OsuConfig.Tablet, false).Disabled = true; - Set(OsuConfig.UpdatePending, false).Disabled = true; - Set(OsuConfig.UseSkinCursor, false).Disabled = true; - Set(OsuConfig.UseTaikoSkin, false).Disabled = true; - Set(OsuConfig.Video, true).Disabled = true; - Set(OsuConfig.Wiimote, false).Disabled = true; - Set(OsuConfig.YahooIntegration, false).Disabled = true; - Set(OsuConfig.ForceFrameFlush, false).Disabled = true; - Set(OsuConfig.DetectPerformanceIssues, true).Disabled = true; - Set(OsuConfig.RawInput, false).Disabled = true; - Set(OsuConfig.AbsoluteToOsuWindow, Get(OsuConfig.RawInput)).Disabled = true; - Set(OsuConfig.ShowMenuTips, true).Disabled = true; - Set(OsuConfig.HiddenShowFirstApproach, true).Disabled = true; - Set(OsuConfig.ComboColourSliderBall, true).Disabled = true; - Set(OsuConfig.AlternativeChatFont, false).Disabled = true; - Set(OsuConfig.DisplayStarsMaximum, 10.0, 0.0, 10.0).Disabled = true; - Set(OsuConfig.DisplayStarsMinimum, 0.0, 0.0, 10.0).Disabled = true; - Set(OsuConfig.UpdateFailCount, 0).Disabled = true; - //Set(OsuConfig.TreeSortMode, TreeGroupMode.Show_All).Disabled = true; - //Set(OsuConfig.TreeSortMode2, TreeSortMode.Title).Disabled = true; - Set(OsuConfig.PermanentSongInfo, false).Disabled = true; - Set(OsuConfig.Ticker, false).Disabled = true; - Set(OsuConfig.CompatibilityContext, false).Disabled = true; - Set(OsuConfig.CanForceOptimusCompatibility, true).Disabled = true; } public OsuConfigManager(Storage storage) : base(storage) @@ -197,150 +77,28 @@ namespace osu.Game.Configuration public enum OsuConfig { - // New osu: Ruleset, Token, - // Imported from old osu: - BeatmapDirectory, - AllowPublicInvites, - AutoChatHide, - AutomaticDownload, - AutomaticDownloadNoVideo, - BlockNonFriendPM, - Bloom, - BloomSoftening, - BossKeyFirstActivation, - ChatAudibleHighlight, - ChatChannels, - ChatFilter, - ChatHighlightName, - ChatMessageNotification, - ChatLastChannel, - ChatRemoveForeign, - ChatSortMode, - ComboBurst, - ComboFire, - ComboFireHeight, - ConfirmExit, - AutoSendNowPlaying, MenuCursorSize, GameplayCursorSize, - AutomaticCursorSizing, DimLevel, - Display, - DisplayCityLocation, - DistanceSpacingEnabled, - EditorTip, - VideoEditor, - EditorDefaultSkin, - EditorSnakingSliders, - EditorHitAnimations, - EditorFollowPoints, - EditorStacking, - ForceSliderRendering, - FpsCounter, - FrameTimeDisplay, - GuideTips, - CursorRipple, - HighlightWords, - HighResolution, - HitLighting, - IgnoreBarline, - IgnoreBeatmapSamples, - IgnoreBeatmapSkins, - IgnoreList, KeyOverlay, - Language, - LastPlayMode, - AllowNowPlayingHighlights, - LastVersion, - LastVersionPermissionsFailed, - LoadSubmittedThread, - LobbyPlayMode, ShowInterface, - ShowInterfaceDuringRelax, - LobbyShowExistingOnly, - LobbyShowFriendsOnly, - LobbyShowFull, - LobbyShowInProgress, - LobbyShowPassworded, - LogPrivateMessages, - LowResolution, - ManiaSpeed, - UsePerBeatmapManiaSpeed, - ManiaSpeedBPMScale, - MenuTip, MouseDisableButtons, MouseDisableWheel, - MouseSpeed, AudioOffset, - ScoreMeterScale, - DistanceSpacing, - EditorBeatDivisor, - EditorGridSize, - EditorGridSizeDesign, - CustomFrameLimit, - MsnIntegration, - MyPcSucks, - NotifyFriends, - NotifySubmittedThread, - PopupDuringGameplay, - ProgressBarType, - RankType, - RefreshRate, - OverrideRefreshRate, - ScaleMode, - ScoreboardVisible, - ScoreMeter, - ScreenshotId, - MenuSnow, - MenuTriangles, - SongSelectThumbnails, - ScreenshotFormat, - ShowReplayComments, - ShowSpectators, - ShowStoryboard, - Skin, - SkinSamples, - SkipTablet, - SnakingInSliders, - SnakingOutSliders, - Tablet, - UpdatePending, - UserFilter, - UseSkinCursor, - UseTaikoSkin, - Video, - Wiimote, - YahooIntegration, - ForceFrameFlush, - DetectPerformanceIssues, MenuMusic, MenuVoice, MenuParallax, BeatmapDetailTab, - RawInput, - AbsoluteToOsuWindow, - ConfineMouse, - [Obsolete] - ConfineMouseToFullscreen, - ShowMenuTips, - HiddenShowFirstApproach, - ComboColourSliderBall, - AlternativeChatFont, Username, - DisplayStarsMaximum, - DisplayStarsMinimum, AudioDevice, ReleaseStream, - UpdateFailCount, SavePassword, SaveUsername, - TreeSortMode, - TreeSortMode2, - PermanentSongInfo, - Ticker, - CompatibilityContext, - CanForceOptimusCompatibility, + DisplayStarsMinimum, + DisplayStarsMaximum, + SnakingInSliders, + SnakingOutSliders } } diff --git a/osu.Game/Configuration/ProgressBarType.cs b/osu.Game/Configuration/ProgressBarType.cs deleted file mode 100644 index a768b9f129..0000000000 --- a/osu.Game/Configuration/ProgressBarType.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using System.ComponentModel; - -namespace osu.Game.Configuration -{ - public enum ProgressBarType - { - Off, - Pie, - [Description("Top Right")] - TopRight, - [Description("Bottom Right")] - BottomRight, - Bottom - } -} \ No newline at end of file diff --git a/osu.Game/Overlays/Options/Sections/Audio/VolumeOptions.cs b/osu.Game/Overlays/Options/Sections/Audio/VolumeOptions.cs index d8e8964b17..c3eb04da13 100644 --- a/osu.Game/Overlays/Options/Sections/Audio/VolumeOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Audio/VolumeOptions.cs @@ -4,8 +4,6 @@ using osu.Framework.Allocation; using osu.Framework.Audio; using osu.Framework.Graphics; -using osu.Game.Configuration; -using osu.Game.Graphics.UserInterface; namespace osu.Game.Overlays.Options.Sections.Audio { @@ -14,18 +12,13 @@ namespace osu.Game.Overlays.Options.Sections.Audio protected override string Header => "Volume"; [BackgroundDependencyLoader] - private void load(OsuConfigManager config, AudioManager audio) + private void load(AudioManager audio) { Children = new Drawable[] { new OptionSlider { LabelText = "Master", Bindable = audio.Volume }, new OptionSlider { LabelText = "Effect", Bindable = audio.VolumeSample }, new OptionSlider { LabelText = "Music", Bindable = audio.VolumeTrack }, - new OsuCheckbox - { - LabelText = "Ignore beatmap hitsounds", - Bindable = config.GetBindable(OsuConfig.IgnoreBeatmapSamples) - } }; } } diff --git a/osu.Game/Overlays/Options/Sections/EditorSection.cs b/osu.Game/Overlays/Options/Sections/EditorSection.cs deleted file mode 100644 index 513d89c601..0000000000 --- a/osu.Game/Overlays/Options/Sections/EditorSection.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2007-2017 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.Graphics; -using osu.Game.Graphics.UserInterface; -using OpenTK; - -namespace osu.Game.Overlays.Options.Sections -{ - public class EditorSection : OptionsSection - { - public override string Header => "Editor"; - public override FontAwesome Icon => FontAwesome.fa_pencil; - - [BackgroundDependencyLoader] - private void load(OsuConfigManager config) - { - FlowContent.Spacing = new Vector2(0, 5); - Children = new Drawable[] - { - new OsuCheckbox - { - LabelText = "Background video", - Bindable = config.GetBindable(OsuConfig.VideoEditor) - }, - new OsuCheckbox - { - LabelText = "Always use default skin", - Bindable = config.GetBindable(OsuConfig.EditorDefaultSkin) - }, - new OsuCheckbox - { - LabelText = "Snaking sliders", - Bindable = config.GetBindable(OsuConfig.EditorSnakingSliders) - }, - new OsuCheckbox - { - LabelText = "Hit animations", - Bindable = config.GetBindable(OsuConfig.EditorHitAnimations) - }, - new OsuCheckbox - { - LabelText = "Follow points", - Bindable = config.GetBindable(OsuConfig.EditorFollowPoints) - }, - new OsuCheckbox - { - LabelText = "Stacking", - Bindable = config.GetBindable(OsuConfig.EditorStacking) - }, - }; - } - } -} - diff --git a/osu.Game/Overlays/Options/Sections/Gameplay/GeneralOptions.cs b/osu.Game/Overlays/Options/Sections/Gameplay/GeneralOptions.cs index 99f9ecbaed..c278b59a51 100644 --- a/osu.Game/Overlays/Options/Sections/Gameplay/GeneralOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Gameplay/GeneralOptions.cs @@ -22,21 +22,6 @@ namespace osu.Game.Overlays.Options.Sections.Gameplay LabelText = "Background dim", Bindable = config.GetBindable(OsuConfig.DimLevel) }, - new OptionEnumDropdown - { - LabelText = "Progress display", - Bindable = config.GetBindable(OsuConfig.ProgressBarType) - }, - new OptionEnumDropdown - { - LabelText = "Score meter type", - Bindable = config.GetBindable(OsuConfig.ScoreMeter) - }, - new OptionSlider - { - LabelText = "Score meter size", - Bindable = config.GetBindable(OsuConfig.ScoreMeterScale) - }, new OsuCheckbox { LabelText = "Show score overlay", @@ -47,21 +32,6 @@ namespace osu.Game.Overlays.Options.Sections.Gameplay LabelText = "Always show key overlay", Bindable = config.GetBindable(OsuConfig.KeyOverlay) }, - new OsuCheckbox - { - LabelText = "Show approach circle on first \"Hidden\" object", - Bindable = config.GetBindable(OsuConfig.HiddenShowFirstApproach) - }, - new OsuCheckbox - { - LabelText = "Scale osu!mania scroll speed with BPM", - Bindable = config.GetBindable(OsuConfig.ManiaSpeedBPMScale) - }, - new OsuCheckbox - { - LabelText = "Remember osu!mania scroll speed per beatmap", - Bindable = config.GetBindable(OsuConfig.UsePerBeatmapManiaSpeed) - }, }; } } diff --git a/osu.Game/Overlays/Options/Sections/General/LanguageOptions.cs b/osu.Game/Overlays/Options/Sections/General/LanguageOptions.cs index 1387f981d3..7bc1a54455 100644 --- a/osu.Game/Overlays/Options/Sections/General/LanguageOptions.cs +++ b/osu.Game/Overlays/Options/Sections/General/LanguageOptions.cs @@ -4,7 +4,6 @@ using osu.Framework.Allocation; using osu.Framework.Configuration; using osu.Framework.Graphics; -using osu.Game.Configuration; using osu.Game.Graphics.UserInterface; namespace osu.Game.Overlays.Options.Sections.General @@ -14,21 +13,15 @@ namespace osu.Game.Overlays.Options.Sections.General protected override string Header => "Language"; [BackgroundDependencyLoader] - private void load(OsuConfigManager osuConfig, FrameworkConfigManager frameworkConfig) + private void load(FrameworkConfigManager frameworkConfig) { Children = new Drawable[] { - new OptionLabel { Text = "TODO: Dropdown" }, new OsuCheckbox { LabelText = "Prefer metadata in original language", Bindable = frameworkConfig.GetBindable(FrameworkConfig.ShowUnicode) }, - new OsuCheckbox - { - LabelText = "Use alternative font for chat display", - Bindable = osuConfig.GetBindable(OsuConfig.AlternativeChatFont) - }, }; } } diff --git a/osu.Game/Overlays/Options/Sections/Graphics/DetailOptions.cs b/osu.Game/Overlays/Options/Sections/Graphics/DetailOptions.cs index 0af8a4c580..d8906d74ba 100644 --- a/osu.Game/Overlays/Options/Sections/Graphics/DetailOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Graphics/DetailOptions.cs @@ -27,41 +27,6 @@ namespace osu.Game.Overlays.Options.Sections.Graphics LabelText = "Snaking out sliders", Bindable = config.GetBindable(OsuConfig.SnakingOutSliders) }, - new OsuCheckbox - { - LabelText = "Background video", - Bindable = config.GetBindable(OsuConfig.Video) - }, - new OsuCheckbox - { - LabelText = "Storyboards", - Bindable = config.GetBindable(OsuConfig.ShowStoryboard) - }, - new OsuCheckbox - { - LabelText = "Combo bursts", - Bindable = config.GetBindable(OsuConfig.ComboBurst) - }, - new OsuCheckbox - { - LabelText = "Hit lighting", - Bindable = config.GetBindable(OsuConfig.HitLighting) - }, - new OsuCheckbox - { - LabelText = "Shaders", - Bindable = config.GetBindable(OsuConfig.Bloom) - }, - new OsuCheckbox - { - LabelText = "Softening filter", - Bindable = config.GetBindable(OsuConfig.BloomSoftening) - }, - new OptionEnumDropdown - { - LabelText = "Screenshot", - Bindable = config.GetBindable(OsuConfig.ScreenshotFormat) - } }; } } diff --git a/osu.Game/Overlays/Options/Sections/Graphics/LayoutOptions.cs b/osu.Game/Overlays/Options/Sections/Graphics/LayoutOptions.cs index 9f5e3458f3..aed39ca764 100644 --- a/osu.Game/Overlays/Options/Sections/Graphics/LayoutOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Graphics/LayoutOptions.cs @@ -24,7 +24,6 @@ namespace osu.Game.Overlays.Options.Sections.Graphics Children = new Drawable[] { - new OptionLabel { Text = "Resolution: TODO dropdown" }, new OptionEnumDropdown { LabelText = "Screen mode", diff --git a/osu.Game/Overlays/Options/Sections/Graphics/MainMenuOptions.cs b/osu.Game/Overlays/Options/Sections/Graphics/MainMenuOptions.cs index 13683edb32..83a2a382ad 100644 --- a/osu.Game/Overlays/Options/Sections/Graphics/MainMenuOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Graphics/MainMenuOptions.cs @@ -9,28 +9,18 @@ namespace osu.Game.Overlays.Options.Sections.Graphics { public class MainMenuOptions : OptionsSubsection { - protected override string Header => "Main Menu"; + protected override string Header => "User Interface"; [BackgroundDependencyLoader] private void load(OsuConfigManager config) { Children = new[] { - new OsuCheckbox - { - LabelText = "Snow", - Bindable = config.GetBindable(OsuConfig.MenuSnow) - }, new OsuCheckbox { LabelText = "Parallax", Bindable = config.GetBindable(OsuConfig.MenuParallax) }, - new OsuCheckbox - { - LabelText = "Menu tips", - Bindable = config.GetBindable(OsuConfig.ShowMenuTips) - }, }; } } diff --git a/osu.Game/Overlays/Options/Sections/Graphics/RendererOptions.cs b/osu.Game/Overlays/Options/Sections/Graphics/RendererOptions.cs index c898879167..fafe91cfc5 100644 --- a/osu.Game/Overlays/Options/Sections/Graphics/RendererOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Graphics/RendererOptions.cs @@ -4,8 +4,6 @@ using osu.Framework.Allocation; using osu.Framework.Configuration; using osu.Framework.Graphics; -using osu.Game.Configuration; -using osu.Game.Graphics.UserInterface; namespace osu.Game.Overlays.Options.Sections.Graphics { @@ -14,7 +12,7 @@ namespace osu.Game.Overlays.Options.Sections.Graphics protected override string Header => "Renderer"; [BackgroundDependencyLoader] - private void load(OsuConfigManager osuConfig, FrameworkConfigManager config) + private void load(FrameworkConfigManager config) { // NOTE: Compatability mode omitted Children = new Drawable[] @@ -25,21 +23,6 @@ namespace osu.Game.Overlays.Options.Sections.Graphics LabelText = "Frame limiter", Bindable = config.GetBindable(FrameworkConfig.FrameSync) }, - new OsuCheckbox - { - LabelText = "Show FPS counter", - Bindable = osuConfig.GetBindable(OsuConfig.FpsCounter), - }, - new OsuCheckbox - { - LabelText = "Reduce dropped frames", - Bindable = osuConfig.GetBindable(OsuConfig.ForceFrameFlush), - }, - new OsuCheckbox - { - LabelText = "Detect performance issues", - Bindable = osuConfig.GetBindable(OsuConfig.DetectPerformanceIssues), - }, }; } } diff --git a/osu.Game/Overlays/Options/Sections/Graphics/SongSelectGraphicsOptions.cs b/osu.Game/Overlays/Options/Sections/Graphics/SongSelectGraphicsOptions.cs deleted file mode 100644 index cbaeebcee3..0000000000 --- a/osu.Game/Overlays/Options/Sections/Graphics/SongSelectGraphicsOptions.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Framework.Allocation; -using osu.Game.Configuration; -using osu.Game.Graphics.UserInterface; - -namespace osu.Game.Overlays.Options.Sections.Graphics -{ - public class SongSelectGraphicsOptions : OptionsSubsection - { - protected override string Header => "Song Select"; - - [BackgroundDependencyLoader] - private void load(OsuConfigManager config) - { - Children = new[] - { - new OsuCheckbox - { - LabelText = "Show thumbnails", - Bindable = config.GetBindable(OsuConfig.SongSelectThumbnails) - } - }; - } - } -} \ No newline at end of file diff --git a/osu.Game/Overlays/Options/Sections/GraphicsSection.cs b/osu.Game/Overlays/Options/Sections/GraphicsSection.cs index b537cf4219..dbbcbde2b9 100644 --- a/osu.Game/Overlays/Options/Sections/GraphicsSection.cs +++ b/osu.Game/Overlays/Options/Sections/GraphicsSection.cs @@ -20,7 +20,6 @@ namespace osu.Game.Overlays.Options.Sections new LayoutOptions(), new DetailOptions(), new MainMenuOptions(), - new SongSelectGraphicsOptions(), }; } } diff --git a/osu.Game/Overlays/Options/Sections/Input/KeyboardOptions.cs b/osu.Game/Overlays/Options/Sections/Input/KeyboardOptions.cs index f3f5445259..b7e8598cff 100644 --- a/osu.Game/Overlays/Options/Sections/Input/KeyboardOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Input/KeyboardOptions.cs @@ -17,13 +17,8 @@ namespace osu.Game.Overlays.Options.Sections.Input new OsuButton { RelativeSizeAxes = Axes.X, - Text = "Change keyboard bindings" + Text = "Key Configuration" }, - new OsuButton - { - RelativeSizeAxes = Axes.X, - Text = "osu!mania layout" - } }; } } diff --git a/osu.Game/Overlays/Options/Sections/Input/MouseOptions.cs b/osu.Game/Overlays/Options/Sections/Input/MouseOptions.cs index 27b8159d63..12789aa0ec 100644 --- a/osu.Game/Overlays/Options/Sections/Input/MouseOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Input/MouseOptions.cs @@ -19,21 +19,6 @@ namespace osu.Game.Overlays.Options.Sections.Input { Children = new Drawable[] { - new OptionSlider - { - LabelText = "Sensitivity", - Bindable = osuConfig.GetBindable(OsuConfig.MouseSpeed) - }, - new OsuCheckbox - { - LabelText = "Raw input", - Bindable = osuConfig.GetBindable(OsuConfig.RawInput) - }, - new OsuCheckbox - { - LabelText = "Map absolute raw input to the osu! window", - Bindable = osuConfig.GetBindable(OsuConfig.AbsoluteToOsuWindow) - }, new OptionEnumDropdown { LabelText = "Confine mouse cursor", @@ -49,11 +34,6 @@ namespace osu.Game.Overlays.Options.Sections.Input LabelText = "Disable mouse buttons during gameplay", Bindable = osuConfig.GetBindable(OsuConfig.MouseDisableButtons) }, - new OsuCheckbox - { - LabelText = "Cursor ripples", - Bindable = osuConfig.GetBindable(OsuConfig.CursorRipple) - }, }; } diff --git a/osu.Game/Overlays/Options/Sections/Input/OtherInputOptions.cs b/osu.Game/Overlays/Options/Sections/Input/OtherInputOptions.cs deleted file mode 100644 index 9323f7514b..0000000000 --- a/osu.Game/Overlays/Options/Sections/Input/OtherInputOptions.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2007-2017 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.Graphics.UserInterface; - -namespace osu.Game.Overlays.Options.Sections.Input -{ - public class OtherInputOptions : OptionsSubsection - { - protected override string Header => "Other"; - - [BackgroundDependencyLoader] - private void load(OsuConfigManager config) - { - Children = new Drawable[] - { - new OsuCheckbox - { - LabelText = "OS TabletPC support", - Bindable = config.GetBindable(OsuConfig.Tablet) - }, - new OsuCheckbox - { - LabelText = "Wiimote/TaTaCon Drum Support", - Bindable = config.GetBindable(OsuConfig.Wiimote) - }, - }; - } - } -} - diff --git a/osu.Game/Overlays/Options/Sections/InputSection.cs b/osu.Game/Overlays/Options/Sections/InputSection.cs index 69a3e20f6f..d39d0a0e20 100644 --- a/osu.Game/Overlays/Options/Sections/InputSection.cs +++ b/osu.Game/Overlays/Options/Sections/InputSection.cs @@ -18,7 +18,6 @@ namespace osu.Game.Overlays.Options.Sections { new MouseOptions(), new KeyboardOptions(), - new OtherInputOptions(), }; } } diff --git a/osu.Game/Overlays/Options/Sections/MaintenanceSection.cs b/osu.Game/Overlays/Options/Sections/MaintenanceSection.cs index 638c1c9a64..a50f1f3ff0 100644 --- a/osu.Game/Overlays/Options/Sections/MaintenanceSection.cs +++ b/osu.Game/Overlays/Options/Sections/MaintenanceSection.cs @@ -3,7 +3,6 @@ using osu.Framework.Graphics; using osu.Game.Graphics; -using osu.Game.Graphics.UserInterface; using OpenTK; namespace osu.Game.Overlays.Options.Sections @@ -18,26 +17,7 @@ namespace osu.Game.Overlays.Options.Sections FlowContent.Spacing = new Vector2(0, 5); Children = new Drawable[] { - new OsuButton - { - RelativeSizeAxes = Axes.X, - Text = "Delete all unranked maps", - }, - new OsuButton - { - RelativeSizeAxes = Axes.X, - Text = "Repair folder permissions", - }, - new OsuButton - { - RelativeSizeAxes = Axes.X, - Text = "Mark all maps as played", - }, - new OsuButton - { - RelativeSizeAxes = Axes.X, - Text = "Run osu! updater", - }, + }; } } diff --git a/osu.Game/Overlays/Options/Sections/Online/InGameChatOptions.cs b/osu.Game/Overlays/Options/Sections/Online/InGameChatOptions.cs deleted file mode 100644 index 9a477f40c7..0000000000 --- a/osu.Game/Overlays/Options/Sections/Online/InGameChatOptions.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2007-2017 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.Graphics.UserInterface; - -namespace osu.Game.Overlays.Options.Sections.Online -{ - public class InGameChatOptions : OptionsSubsection - { - protected override string Header => "Chat"; - - [BackgroundDependencyLoader] - private void load(OsuConfigManager config) - { - Children = new Drawable[] - { - new OsuCheckbox - { - LabelText = "Filter offensive words", - Bindable = config.GetBindable(OsuConfig.ChatFilter) - }, - new OsuCheckbox - { - LabelText = "Filter foreign characters", - Bindable = config.GetBindable(OsuConfig.ChatRemoveForeign) - }, - new OsuCheckbox - { - LabelText = "Log private messages", - Bindable = config.GetBindable(OsuConfig.LogPrivateMessages) - }, - new OsuCheckbox - { - LabelText = "Block private messages from non-friends", - Bindable = config.GetBindable(OsuConfig.BlockNonFriendPM) - }, - new OptionLabel { Text = "Chat ignore list (space-seperated list)" }, - new OptionTextBox { - RelativeSizeAxes = Axes.X, - Bindable = config.GetBindable(OsuConfig.IgnoreList) - }, - new OptionLabel { Text = "Chat highlight words (space-seperated list)" }, - new OptionTextBox { - RelativeSizeAxes = Axes.X, - Bindable = config.GetBindable(OsuConfig.HighlightWords) - }, - }; - } - } -} \ No newline at end of file diff --git a/osu.Game/Overlays/Options/Sections/Online/IntegrationOptions.cs b/osu.Game/Overlays/Options/Sections/Online/IntegrationOptions.cs deleted file mode 100644 index d4298ee43c..0000000000 --- a/osu.Game/Overlays/Options/Sections/Online/IntegrationOptions.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2007-2017 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.Graphics.UserInterface; - -namespace osu.Game.Overlays.Options.Sections.Online -{ - public class IntegrationOptions : OptionsSubsection - { - protected override string Header => "Integration"; - - [BackgroundDependencyLoader] - private void load(OsuConfigManager config) - { - Children = new Drawable[] - { - new OsuCheckbox - { - LabelText = "Integrate with Yahoo! status display", - Bindable = config.GetBindable(OsuConfig.YahooIntegration) - }, - new OsuCheckbox - { - LabelText = "Integrate with MSN Live status display", - Bindable = config.GetBindable(OsuConfig.MsnIntegration) - }, - new OsuCheckbox - { - LabelText = "Automatically start osu!direct downloads", - Bindable = config.GetBindable(OsuConfig.AutomaticDownload) - }, - new OsuCheckbox - { - LabelText = "Prefer no-video downloads", - Bindable = config.GetBindable(OsuConfig.AutomaticDownloadNoVideo) - }, - }; - } - } -} \ No newline at end of file diff --git a/osu.Game/Overlays/Options/Sections/Online/NotificationsOptions.cs b/osu.Game/Overlays/Options/Sections/Online/NotificationsOptions.cs deleted file mode 100644 index 350121db16..0000000000 --- a/osu.Game/Overlays/Options/Sections/Online/NotificationsOptions.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2007-2017 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.Graphics.UserInterface; - -namespace osu.Game.Overlays.Options.Sections.Online -{ - public class NotificationsOptions : OptionsSubsection - { - protected override string Header => "Notifications"; - - [BackgroundDependencyLoader] - private void load(OsuConfigManager config) - { - Children = new Drawable[] - { - new OsuCheckbox - { - LabelText = "Enable chat ticker", - Bindable = config.GetBindable(OsuConfig.Ticker) - }, - new OsuCheckbox - { - LabelText = "Show a notification popup when someone says your name", - Bindable = config.GetBindable(OsuConfig.ChatHighlightName) - }, - new OsuCheckbox - { - LabelText = "Show chat message notifications", - Bindable = config.GetBindable(OsuConfig.ChatMessageNotification) - }, - new OsuCheckbox - { - LabelText = "Play a sound when someone says your name", - Bindable = config.GetBindable(OsuConfig.ChatAudibleHighlight) - }, - new OsuCheckbox - { - LabelText = "Show notification popups instantly during gameplay", - Bindable = config.GetBindable(OsuConfig.PopupDuringGameplay) - }, - new OsuCheckbox - { - LabelText = "Show notification popups when friends change status", - Bindable = config.GetBindable(OsuConfig.NotifyFriends) - }, - }; - } - } -} \ No newline at end of file diff --git a/osu.Game/Overlays/Options/Sections/Online/PrivacyOptions.cs b/osu.Game/Overlays/Options/Sections/Online/PrivacyOptions.cs deleted file mode 100644 index 5c4d4c3502..0000000000 --- a/osu.Game/Overlays/Options/Sections/Online/PrivacyOptions.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2007-2017 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.Graphics.UserInterface; - -namespace osu.Game.Overlays.Options.Sections.Online -{ - public class PrivacyOptions : OptionsSubsection - { - protected override string Header => "Privacy"; - - [BackgroundDependencyLoader] - private void load(OsuConfigManager config) - { - Children = new Drawable[] - { - new OsuCheckbox - { - LabelText = "Share your city location with others", - Bindable = config.GetBindable(OsuConfig.DisplayCityLocation) - }, - new OsuCheckbox - { - LabelText = "Allow multiplayer game invites from all users", - Bindable = config.GetBindable(OsuConfig.AllowPublicInvites) - }, - }; - } - } -} \ No newline at end of file diff --git a/osu.Game/Overlays/Options/Sections/OnlineSection.cs b/osu.Game/Overlays/Options/Sections/OnlineSection.cs index a27b00e405..1a65a23121 100644 --- a/osu.Game/Overlays/Options/Sections/OnlineSection.cs +++ b/osu.Game/Overlays/Options/Sections/OnlineSection.cs @@ -3,7 +3,6 @@ using osu.Framework.Graphics; using osu.Game.Graphics; -using osu.Game.Overlays.Options.Sections.Online; namespace osu.Game.Overlays.Options.Sections { @@ -16,10 +15,6 @@ namespace osu.Game.Overlays.Options.Sections { Children = new Drawable[] { - new InGameChatOptions(), - new PrivacyOptions(), - new NotificationsOptions(), - new IntegrationOptions(), }; } } diff --git a/osu.Game/Overlays/Options/Sections/SkinSection.cs b/osu.Game/Overlays/Options/Sections/SkinSection.cs index 0e533928a8..b3c225d00c 100644 --- a/osu.Game/Overlays/Options/Sections/SkinSection.cs +++ b/osu.Game/Overlays/Options/Sections/SkinSection.cs @@ -21,43 +21,6 @@ namespace osu.Game.Overlays.Options.Sections FlowContent.Spacing = new Vector2(0, 5); Children = new Drawable[] { - new OptionLabel { Text = "TODO: Skin preview textures" }, - new OptionLabel { Text = "Current skin: TODO dropdown" }, - new OsuButton - { - RelativeSizeAxes = Axes.X, - Text = "Preview gameplay", - }, - new OsuButton - { - RelativeSizeAxes = Axes.X, - Text = "Open skin folder", - }, - new OsuButton - { - RelativeSizeAxes = Axes.X, - Text = "Export as .osk", - }, - new OsuCheckbox - { - LabelText = "Ignore all beatmap skins", - Bindable = config.GetBindable(OsuConfig.IgnoreBeatmapSkins) - }, - new OsuCheckbox - { - LabelText = "Use skin's sound samples", - Bindable = config.GetBindable(OsuConfig.SkinSamples) - }, - new OsuCheckbox - { - LabelText = "Use Taiko skin for Taiko mode", - Bindable = config.GetBindable(OsuConfig.UseTaikoSkin) - }, - new OsuCheckbox - { - LabelText = "Always use skin cursor", - Bindable = config.GetBindable(OsuConfig.UseSkinCursor) - }, new OptionSlider { LabelText = "Menu cursor size", @@ -68,11 +31,6 @@ namespace osu.Game.Overlays.Options.Sections LabelText = "Gameplay cursor size", Bindable = config.GetBindable(OsuConfig.GameplayCursorSize) }, - new OsuCheckbox - { - LabelText = "Automatic cursor size", - Bindable = config.GetBindable(OsuConfig.AutomaticCursorSizing) - }, }; } diff --git a/osu.Game/Overlays/OptionsOverlay.cs b/osu.Game/Overlays/OptionsOverlay.cs index 0c66cb5881..dcbce80c69 100644 --- a/osu.Game/Overlays/OptionsOverlay.cs +++ b/osu.Game/Overlays/OptionsOverlay.cs @@ -51,7 +51,6 @@ namespace osu.Game.Overlays new AudioSection(), new SkinSection(), new InputSection(), - new EditorSection(), new OnlineSection(), new MaintenanceSection(), new DebugSection(), diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 7b034c2838..4385e737fd 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -356,7 +356,6 @@ - @@ -367,19 +366,12 @@ - - - - - - - From a036b059e8c31e3fd3d5d7984189f3766691e6cb Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 2 May 2017 21:40:06 +0900 Subject: [PATCH 08/11] Use provided parameters to avoid a second lookup. --- osu.Game/Configuration/OsuConfigManager.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index 1fcb33b248..2c9574905f 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -24,14 +24,14 @@ namespace osu.Game.Configuration Set(OsuConfig.Username, string.Empty); Set(OsuConfig.Token, string.Empty); - Set(OsuConfig.SavePassword, false).ValueChanged += delegate + Set(OsuConfig.SavePassword, false).ValueChanged += val => { - if (Get(OsuConfig.SavePassword)) Set(OsuConfig.SaveUsername, true); + if (val) Set(OsuConfig.SaveUsername, true); }; - Set(OsuConfig.SaveUsername, true).ValueChanged += delegate + Set(OsuConfig.SaveUsername, true).ValueChanged += val => { - if (!Get(OsuConfig.SaveUsername)) Set(OsuConfig.SavePassword, false); + if (!val) Set(OsuConfig.SavePassword, false); }; // Audio From 489f58688799831916930fbd1c2463d872caa436 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 3 May 2017 20:34:53 +0900 Subject: [PATCH 09/11] Add FPS display toggling. Kinda temporary but better than nothing. --- osu.Game/Configuration/OsuConfigManager.cs | 5 ++++- osu.Game/OsuGameBase.cs | 12 ++++++++++++ .../Options/Sections/Graphics/RendererOptions.cs | 9 ++++++++- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index 2c9574905f..3907496ca2 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -53,6 +53,8 @@ namespace osu.Game.Configuration // Graphics + Set(OsuConfig.ShowFpsDisplay, false); + Set(OsuConfig.MenuParallax, true); Set(OsuConfig.SnakingInSliders, true); @@ -99,6 +101,7 @@ namespace osu.Game.Configuration DisplayStarsMinimum, DisplayStarsMaximum, SnakingInSliders, - SnakingOutSliders + SnakingOutSliders, + ShowFpsDisplay } } diff --git a/osu.Game/OsuGameBase.cs b/osu.Game/OsuGameBase.cs index c9d7d856db..a814b5f125 100644 --- a/osu.Game/OsuGameBase.cs +++ b/osu.Game/OsuGameBase.cs @@ -19,6 +19,7 @@ using osu.Game.Graphics.Cursor; using osu.Game.Graphics.Processing; using osu.Game.Online.API; using SQLite.Net; +using osu.Framework.Graphics.Performance; namespace osu.Game { @@ -44,6 +45,8 @@ namespace osu.Game public readonly Bindable Beatmap = new Bindable(); + private Bindable fpsDisplayVisible; + protected AssemblyName AssemblyName => Assembly.GetEntryAssembly()?.GetName() ?? new AssemblyName { Version = new Version() }; public bool IsDeployedBuild => AssemblyName.Version.Major > 0; @@ -160,6 +163,15 @@ 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(OsuConfig.ShowFpsDisplay); + fpsDisplayVisible.ValueChanged += val => + { + FrameStatisticsMode = val ? FrameStatisticsMode.Minimal : FrameStatisticsMode.None; + }; + fpsDisplayVisible.TriggerChange(); } public override void SetHost(GameHost host) diff --git a/osu.Game/Overlays/Options/Sections/Graphics/RendererOptions.cs b/osu.Game/Overlays/Options/Sections/Graphics/RendererOptions.cs index fafe91cfc5..58bf2b7996 100644 --- a/osu.Game/Overlays/Options/Sections/Graphics/RendererOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Graphics/RendererOptions.cs @@ -4,6 +4,8 @@ using osu.Framework.Allocation; using osu.Framework.Configuration; using osu.Framework.Graphics; +using osu.Game.Configuration; +using osu.Game.Graphics.UserInterface; namespace osu.Game.Overlays.Options.Sections.Graphics { @@ -12,7 +14,7 @@ namespace osu.Game.Overlays.Options.Sections.Graphics protected override string Header => "Renderer"; [BackgroundDependencyLoader] - private void load(FrameworkConfigManager config) + private void load(FrameworkConfigManager config, OsuConfigManager osuConfig) { // NOTE: Compatability mode omitted Children = new Drawable[] @@ -23,6 +25,11 @@ namespace osu.Game.Overlays.Options.Sections.Graphics LabelText = "Frame limiter", Bindable = config.GetBindable(FrameworkConfig.FrameSync) }, + new OsuCheckbox + { + LabelText = "Show FPS", + Bindable = osuConfig.GetBindable(OsuConfig.ShowFpsDisplay) + }, }; } } From 330dd458bd92228038a50a79c948662cffdea3d0 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 3 May 2017 20:49:52 +0900 Subject: [PATCH 10/11] Trim whitespace. --- osu.Game/Overlays/Options/Sections/MaintenanceSection.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/osu.Game/Overlays/Options/Sections/MaintenanceSection.cs b/osu.Game/Overlays/Options/Sections/MaintenanceSection.cs index a50f1f3ff0..e8a4f91074 100644 --- a/osu.Game/Overlays/Options/Sections/MaintenanceSection.cs +++ b/osu.Game/Overlays/Options/Sections/MaintenanceSection.cs @@ -17,8 +17,7 @@ namespace osu.Game.Overlays.Options.Sections FlowContent.Spacing = new Vector2(0, 5); Children = new Drawable[] { - }; } } -} \ No newline at end of file +} From c39b314ac296b3cc874b478148daaffcbc10b614 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 3 May 2017 21:29:42 +0900 Subject: [PATCH 11/11] Update framework. --- osu-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index 58c108309f..cebdfb1bbb 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 58c108309f72462d8dc45aa488ab78cd6db08cf1 +Subproject commit cebdfb1bbb260e5aaca0a01e06d7128b3d1faae4