Switch 24H toggle from UI settings to language settings

This commit is contained in:
Perry MacMurray
2022-04-05 17:07:58 -04:00
parent 9d475f7b33
commit 2525ec0d18
4 changed files with 12 additions and 11 deletions

View File

@ -6,6 +6,7 @@ using osu.Framework.Bindables;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Framework.Localisation;
using osu.Game.Configuration;
using osu.Game.Extensions;
using osu.Game.Localisation;
@ -19,7 +20,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
protected override LocalisableString Header => GeneralSettingsStrings.LanguageHeader;
[BackgroundDependencyLoader]
private void load(FrameworkConfigManager frameworkConfig)
private void load(FrameworkConfigManager frameworkConfig, OsuConfigManager config)
{
frameworkLocale = frameworkConfig.GetBindable<string>(FrameworkSetting.Locale);
@ -34,6 +35,11 @@ namespace osu.Game.Overlays.Settings.Sections.General
LabelText = GeneralSettingsStrings.PreferOriginalMetadataLanguage,
Current = frameworkConfig.GetBindable<bool>(FrameworkSetting.ShowUnicode)
},
new SettingsCheckbox
{
LabelText = GeneralSettingsStrings.Prefer24HourTime,
Current = config.GetBindable<bool>(OsuSetting.Prefer24HourTime)
},
};
if (!LanguageExtensions.TryParseCultureCode(frameworkLocale.Value, out var locale))