1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-09 09:17:19 +08:00

42 lines
1.5 KiB
C#
Raw Normal View History

// 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
using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Framework.Localisation;
using osu.Game.Configuration;
2021-04-20 17:06:01 +09:00
using osu.Game.Localisation;
2018-04-13 18:19:50 +09:00
namespace osu.Game.Overlays.Settings.Sections.General
{
2022-11-24 14:32:20 +09:00
public partial class LanguageSettings : SettingsSubsection
2018-04-13 18:19:50 +09:00
{
2021-08-11 15:25:08 +08:00
protected override LocalisableString Header => GeneralSettingsStrings.LanguageHeader;
2018-04-13 18:19:50 +09:00
[BackgroundDependencyLoader]
private void load(OsuGameBase game, OsuConfigManager config, FrameworkConfigManager frameworkConfig)
2018-04-13 18:19:50 +09: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,
AlwaysShowSearchBar = true,
2021-04-20 17:06:01 +09:00
},
2018-04-13 18:19:50 +09:00
new SettingsCheckbox
{
LabelText = GeneralSettingsStrings.PreferOriginalMetadataLanguage,
Current = frameworkConfig.GetBindable<bool>(FrameworkSetting.ShowUnicode)
2018-04-13 18:19:50 +09:00
},
new SettingsCheckbox
{
2022-04-07 18:20:15 +09:00
LabelText = GeneralSettingsStrings.Prefer24HourTimeDisplay,
Current = config.GetBindable<bool>(OsuSetting.Prefer24HourTime)
},
2018-04-13 18:19:50 +09:00
};
}
}
}