2019-01-24 17:43:03 +09:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-04-13 18:19:50 +09:00
|
|
|
|
|
2016-11-12 19:44:16 +09:00
|
|
|
|
using osu.Framework.Allocation;
|
2017-04-25 15:53:21 +08:00
|
|
|
|
using osu.Framework.Configuration;
|
2017-01-31 18:37:11 +09:00
|
|
|
|
using osu.Framework.Graphics;
|
2021-07-15 12:50:34 +09:00
|
|
|
|
using osu.Framework.Localisation;
|
2022-04-05 17:07:58 -04:00
|
|
|
|
using osu.Game.Configuration;
|
2021-04-20 17:06:01 +09:00
|
|
|
|
using osu.Game.Localisation;
|
2018-04-13 18:19:50 +09:00
|
|
|
|
|
2017-05-15 10:55:29 +09:00
|
|
|
|
namespace osu.Game.Overlays.Settings.Sections.General
|
2016-11-12 19:44:16 +09:00
|
|
|
|
{
|
2017-05-15 10:55:29 +09:00
|
|
|
|
public partial class LanguageSettings : SettingsSubsection
|
2016-11-12 19:44:16 +09:00
|
|
|
|
{
|
2021-08-11 15:25:08 +08:00
|
|
|
|
protected override LocalisableString Header => GeneralSettingsStrings.LanguageHeader;
|
2018-04-13 18:19:50 +09:00
|
|
|
|
|
2016-11-12 19:44:16 +09:00
|
|
|
|
[BackgroundDependencyLoader]
|
2023-06-08 03:27:23 +03:00
|
|
|
|
private void load(OsuGameBase game, OsuConfigManager config, FrameworkConfigManager frameworkConfig)
|
2016-11-07 19:04:31 -05:00
|
|
|
|
{
|
2016-11-08 18:13:20 -05:00
|
|
|
|
Children = new Drawable[]
|
|
|
|
|
{
|
2023-06-08 02:47:07 +03:00
|
|
|
|
new SettingsEnumDropdown<Language>
|
2021-04-20 17:06:01 +09:00
|
|
|
|
{
|
2021-08-11 15:25:08 +08:00
|
|
|
|
LabelText = GeneralSettingsStrings.LanguageDropdown,
|
2023-06-08 02:47:07 +03:00
|
|
|
|
Current = game.CurrentLanguage,
|
2023-12-14 18:26:13 +09:00
|
|
|
|
AlwaysShowSearchBar = true,
|
2021-04-20 17:06:01 +09:00
|
|
|
|
},
|
2017-05-15 10:55:29 +09:00
|
|
|
|
new SettingsCheckbox
|
2016-11-08 18:13:20 -05:00
|
|
|
|
{
|
2021-08-13 17:15:18 +08:00
|
|
|
|
LabelText = GeneralSettingsStrings.PreferOriginalMetadataLanguage,
|
2020-10-06 17:18:41 +09:00
|
|
|
|
Current = frameworkConfig.GetBindable<bool>(FrameworkSetting.ShowUnicode)
|
2016-11-08 18:13:20 -05:00
|
|
|
|
},
|
2022-04-05 17:07:58 -04:00
|
|
|
|
new SettingsCheckbox
|
|
|
|
|
{
|
2022-04-07 18:20:15 +09:00
|
|
|
|
LabelText = GeneralSettingsStrings.Prefer24HourTimeDisplay,
|
2022-04-05 17:07:58 -04:00
|
|
|
|
Current = config.GetBindable<bool>(OsuSetting.Prefer24HourTime)
|
|
|
|
|
},
|
2016-11-08 18:13:20 -05:00
|
|
|
|
};
|
2016-11-12 19:44:16 +09:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|