From cf3e83ca6225340ee507b21ef87c08ff2293cdfb Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Tue, 25 Apr 2017 15:53:21 +0800 Subject: [PATCH] Save ShowUnicode in framework config. --- osu.Game/Configuration/OsuConfigManager.cs | 11 ----------- .../Options/Sections/General/LanguageOptions.cs | 7 ++++--- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index addb2c2995..7e77de09b0 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -163,16 +163,6 @@ namespace osu.Game.Configuration Set(OsuConfig.UpdateFailCount, 0).Disabled = true; //Set(OsuConfig.TreeSortMode, TreeGroupMode.Show_All).Disabled = true; //Set(OsuConfig.TreeSortMode2, TreeSortMode.Title).Disabled = true; - bool unicodeDefault = false; - switch (Get(OsuConfig.Language)) - { - case @"zh": - case @"ja": - case @"ko": - unicodeDefault = true; - break; - } - Set(OsuConfig.ShowUnicode, unicodeDefault); Set(OsuConfig.PermanentSongInfo, false).Disabled = true; Set(OsuConfig.Ticker, false).Disabled = true; Set(OsuConfig.CompatibilityContext, false).Disabled = true; @@ -339,7 +329,6 @@ namespace osu.Game.Configuration SaveUsername, TreeSortMode, TreeSortMode2, - ShowUnicode, PermanentSongInfo, Ticker, CompatibilityContext, diff --git a/osu.Game/Overlays/Options/Sections/General/LanguageOptions.cs b/osu.Game/Overlays/Options/Sections/General/LanguageOptions.cs index 98b67342cb..1387f981d3 100644 --- a/osu.Game/Overlays/Options/Sections/General/LanguageOptions.cs +++ b/osu.Game/Overlays/Options/Sections/General/LanguageOptions.cs @@ -2,6 +2,7 @@ // 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.Game.Configuration; using osu.Game.Graphics.UserInterface; @@ -13,7 +14,7 @@ namespace osu.Game.Overlays.Options.Sections.General protected override string Header => "Language"; [BackgroundDependencyLoader] - private void load(OsuConfigManager config) + private void load(OsuConfigManager osuConfig, FrameworkConfigManager frameworkConfig) { Children = new Drawable[] { @@ -21,12 +22,12 @@ namespace osu.Game.Overlays.Options.Sections.General new OsuCheckbox { LabelText = "Prefer metadata in original language", - Bindable = config.GetBindable(OsuConfig.ShowUnicode) + Bindable = frameworkConfig.GetBindable(FrameworkConfig.ShowUnicode) }, new OsuCheckbox { LabelText = "Use alternative font for chat display", - Bindable = config.GetBindable(OsuConfig.AlternativeChatFont) + Bindable = osuConfig.GetBindable(OsuConfig.AlternativeChatFont) }, }; }