1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-28 03:01:17 +08:00

Switch 24H toggle from UI settings to language settings

This commit is contained in:
Perry MacMurray
2022-04-05 17:07:58 -04:00
Unverified
parent 9d475f7b33
commit 2525ec0d18
4 changed files with 12 additions and 11 deletions
@@ -29,6 +29,11 @@ namespace osu.Game.Localisation
/// </summary>
public static LocalisableString PreferOriginalMetadataLanguage => new TranslatableString(getKey(@"prefer_original"), @"Prefer metadata in original language");
/// <summary>
/// "Prefer 24-hour time"
/// </summary>
public static LocalisableString Prefer24HourTime => new TranslatableString(getKey(@"prefer_24_hour_time"), @"Prefer 24-hour time");
/// <summary>
/// "Updates"
/// </summary>
@@ -24,11 +24,6 @@ namespace osu.Game.Localisation
/// </summary>
public static LocalisableString CursorRotation => new TranslatableString(getKey(@"cursor_rotation"), @"Rotate cursor when dragging");
/// <summary>
/// "Prefer 24-hour time"
/// </summary>
public static LocalisableString Prefer24HourTime => new TranslatableString(getKey(@"prefer_24_hour_time"), @"Prefer 24-hour time");
/// <summary>
/// "Menu cursor size"
/// </summary>
@@ -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))
@@ -41,11 +41,6 @@ namespace osu.Game.Overlays.Settings.Sections.UserInterface
Current = config.GetBindable<double>(OsuSetting.UIHoldActivationDelay),
KeyboardStep = 50
},
new SettingsCheckbox
{
LabelText = UserInterfaceStrings.Prefer24HourTime,
Current = config.GetBindable<bool>(OsuSetting.Prefer24HourTime)
},
};
}
}