1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 22:07:25 +08:00

Save ShowUnicode in framework config.

This commit is contained in:
Huo Yaoyuan 2017-04-25 15:53:21 +08:00
parent ea226cff76
commit cf3e83ca62
2 changed files with 4 additions and 14 deletions

View File

@ -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<string>(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,

View File

@ -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<bool>(OsuConfig.ShowUnicode)
Bindable = frameworkConfig.GetBindable<bool>(FrameworkConfig.ShowUnicode)
},
new OsuCheckbox
{
LabelText = "Use alternative font for chat display",
Bindable = config.GetBindable<bool>(OsuConfig.AlternativeChatFont)
Bindable = osuConfig.GetBindable<bool>(OsuConfig.AlternativeChatFont)
},
};
}