Use `LocalisableDescription` for skin editor layers dropdown

This commit is contained in:
schiavoanto 2024-10-12 01:38:52 +02:00
parent 1e7e2e0b1c
commit 9cd7f2b5d4
2 changed files with 15 additions and 4 deletions

View File

@ -34,6 +34,16 @@ public static class SkinEditorStrings
/// </summary> /// </summary>
public static LocalisableString Gameplay => new TranslatableString(getKey(@"gameplay"), @"Gameplay"); public static LocalisableString Gameplay => new TranslatableString(getKey(@"gameplay"), @"Gameplay");
/// <summary>
/// "HUD"
/// </summary>
public static LocalisableString HUD => new TranslatableString(getKey(@"hud"), @"HUD");
/// <summary>
/// "Playfield"
/// </summary>
public static LocalisableString Playfield => new TranslatableString(getKey(@"playfield"), @"Playfield");
/// <summary> /// <summary>
/// "Settings ({0})" /// "Settings ({0})"
/// </summary> /// </summary>

View File

@ -1,7 +1,8 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // 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. // See the LICENCE file in the repository root for full licence text.
using System.ComponentModel; using osu.Framework.Localisation;
using osu.Game.Localisation;
namespace osu.Game.Skinning namespace osu.Game.Skinning
{ {
@ -10,13 +11,13 @@ namespace osu.Game.Skinning
/// </summary> /// </summary>
public enum GlobalSkinnableContainers public enum GlobalSkinnableContainers
{ {
[Description("HUD")] [LocalisableDescription(typeof(SkinEditorStrings), nameof(SkinEditorStrings.HUD))]
MainHUDComponents, MainHUDComponents,
[Description("Song select")] [LocalisableDescription(typeof(SkinEditorStrings), nameof(SkinEditorStrings.SongSelect))]
SongSelect, SongSelect,
[Description("Playfield")] [LocalisableDescription(typeof(SkinEditorStrings), nameof(SkinEditorStrings.Playfield))]
Playfield Playfield
} }
} }