Merge pull request #19693 from its5Q/editor-localisation

Add localisation support for beatmap editor setup
This commit is contained in:
Dean Herbert
2022-08-20 11:51:57 +09:00
committed by GitHub
10 changed files with 256 additions and 42 deletions

View File

@ -13,6 +13,7 @@ using osu.Framework.Localisation;
using osu.Game.Beatmaps;
using osu.Game.Graphics.UserInterfaceV2;
using osuTK;
using osu.Game.Localisation;
namespace osu.Game.Screens.Edit.Setup
{
@ -29,7 +30,7 @@ namespace osu.Game.Screens.Edit.Setup
private LabelledSwitchButton letterboxDuringBreaks;
private LabelledSwitchButton samplesMatchPlaybackRate;
public override LocalisableString Title => "Design";
public override LocalisableString Title => EditorSetupStrings.DesignHeader;
[BackgroundDependencyLoader]
private void load()
@ -38,9 +39,9 @@ namespace osu.Game.Screens.Edit.Setup
{
EnableCountdown = new LabelledSwitchButton
{
Label = "Enable countdown",
Label = EditorSetupStrings.EnableCountdown,
Current = { Value = Beatmap.BeatmapInfo.Countdown != CountdownType.None },
Description = "If enabled, an \"Are you ready? 3, 2, 1, GO!\" countdown will be inserted at the beginning of the beatmap, assuming there is enough time to do so."
Description = EditorSetupStrings.CountdownDescription
},
CountdownSettings = new FillFlowContainer
{
@ -52,41 +53,41 @@ namespace osu.Game.Screens.Edit.Setup
{
CountdownSpeed = new LabelledEnumDropdown<CountdownType>
{
Label = "Countdown speed",
Label = EditorSetupStrings.CountdownSpeed,
Current = { Value = Beatmap.BeatmapInfo.Countdown != CountdownType.None ? Beatmap.BeatmapInfo.Countdown : CountdownType.Normal },
Items = Enum.GetValues(typeof(CountdownType)).Cast<CountdownType>().Where(type => type != CountdownType.None)
},
CountdownOffset = new LabelledNumberBox
{
Label = "Countdown offset",
Label = EditorSetupStrings.CountdownOffset,
Current = { Value = Beatmap.BeatmapInfo.CountdownOffset.ToString() },
Description = "If the countdown sounds off-time, use this to make it appear one or more beats early.",
Description = EditorSetupStrings.CountdownOffsetDescription,
}
}
},
Empty(),
widescreenSupport = new LabelledSwitchButton
{
Label = "Widescreen support",
Description = "Allows storyboards to use the full screen space, rather than be confined to a 4:3 area.",
Label = EditorSetupStrings.WidescreenSupport,
Description = EditorSetupStrings.WidescreenSupportDescription,
Current = { Value = Beatmap.BeatmapInfo.WidescreenStoryboard }
},
epilepsyWarning = new LabelledSwitchButton
{
Label = "Epilepsy warning",
Description = "Recommended if the storyboard or video contain scenes with rapidly flashing colours.",
Label = EditorSetupStrings.EpilepsyWarning,
Description = EditorSetupStrings.EpilepsyWarningDescription,
Current = { Value = Beatmap.BeatmapInfo.EpilepsyWarning }
},
letterboxDuringBreaks = new LabelledSwitchButton
{
Label = "Letterbox during breaks",
Description = "Adds horizontal letterboxing to give a cinematic look during breaks.",
Label = EditorSetupStrings.LetterboxDuringBreaks,
Description = EditorSetupStrings.LetterboxDuringBreaksDescription,
Current = { Value = Beatmap.BeatmapInfo.LetterboxInBreaks }
},
samplesMatchPlaybackRate = new LabelledSwitchButton
{
Label = "Samples match playback rate",
Description = "When enabled, all samples will speed up or slow down when rate-changing mods are enabled.",
Label = EditorSetupStrings.SamplesMatchPlaybackRate,
Description = EditorSetupStrings.SamplesMatchPlaybackRateDescription,
Current = { Value = Beatmap.BeatmapInfo.SamplesMatchPlaybackRate }
}
};