mirror of
https://github.com/ppy/osu.git
synced 2026-05-19 15:40:14 +08:00
Localise Sort dropdown
This commit is contained in:
@@ -39,6 +39,36 @@ namespace osu.Game.Localisation
|
||||
/// </summary>
|
||||
public static LocalisableString Team => new TranslatableString(getKey(@"team"), @"Team");
|
||||
|
||||
/// <summary>
|
||||
/// "Sort"
|
||||
/// </summary>
|
||||
public static LocalisableString Sort => new TranslatableString(getKey(@"sort"), @"Sort");
|
||||
|
||||
/// <summary>
|
||||
/// "Score"
|
||||
/// </summary>
|
||||
public static LocalisableString Score => new TranslatableString(getKey(@"score"), @"Score");
|
||||
|
||||
/// <summary>
|
||||
/// "Accuracy"
|
||||
/// </summary>
|
||||
public static LocalisableString Accuracy => new TranslatableString(getKey(@"accuracy"), @"Accuracy");
|
||||
|
||||
/// <summary>
|
||||
/// "Max Combo"
|
||||
/// </summary>
|
||||
public static LocalisableString MaxCombo => new TranslatableString(getKey(@"max_combo"), @"Max Combo");
|
||||
|
||||
/// <summary>
|
||||
/// "Misses"
|
||||
/// </summary>
|
||||
public static LocalisableString Misses => new TranslatableString(getKey(@"misses"), @"Misses");
|
||||
|
||||
/// <summary>
|
||||
/// "Date"
|
||||
/// </summary>
|
||||
public static LocalisableString Date => new TranslatableString(getKey(@"date"), @"Date");
|
||||
|
||||
private static string getKey(string key) => $@"{prefix}:{key}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,26 @@
|
||||
// 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.
|
||||
|
||||
using System.ComponentModel;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Localisation;
|
||||
|
||||
namespace osu.Game.Screens.Select.Leaderboards
|
||||
{
|
||||
public enum LeaderboardSortMode
|
||||
{
|
||||
[LocalisableDescription(typeof(BeatmapLeaderboardWedgeStrings), nameof(BeatmapLeaderboardWedgeStrings.Score))]
|
||||
Score,
|
||||
|
||||
[LocalisableDescription(typeof(BeatmapLeaderboardWedgeStrings), nameof(BeatmapLeaderboardWedgeStrings.Accuracy))]
|
||||
Accuracy,
|
||||
|
||||
[Description("Max Combo")]
|
||||
[LocalisableDescription(typeof(BeatmapLeaderboardWedgeStrings), nameof(BeatmapLeaderboardWedgeStrings.MaxCombo))]
|
||||
MaxCombo,
|
||||
|
||||
[LocalisableDescription(typeof(BeatmapLeaderboardWedgeStrings), nameof(BeatmapLeaderboardWedgeStrings.Misses))]
|
||||
Misses,
|
||||
|
||||
[LocalisableDescription(typeof(BeatmapLeaderboardWedgeStrings), nameof(BeatmapLeaderboardWedgeStrings.Date))]
|
||||
Date,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,10 +69,17 @@ namespace osu.Game.Screens.SelectV2
|
||||
Height = 30,
|
||||
Spacing = new Vector2(5f, 0f),
|
||||
Direction = FillDirection.Horizontal,
|
||||
Padding = new MarginPadding { Left = 125, Right = 133 },
|
||||
Padding = new MarginPadding { Left = 258 },
|
||||
Children = new Drawable[]
|
||||
{
|
||||
sortDropdown = new ShearedDropdown<LeaderboardSortMode>("Sort")
|
||||
selectedModsToggle = new ShearedToggleButton
|
||||
{
|
||||
Anchor = Anchor.CentreRight,
|
||||
Origin = Anchor.CentreRight,
|
||||
Text = UserInterfaceStrings.SelectedMods,
|
||||
Height = 30f,
|
||||
},
|
||||
sortDropdown = new ShearedDropdown<LeaderboardSortMode>(BeatmapLeaderboardWedgeStrings.Sort)
|
||||
{
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
@@ -90,19 +97,6 @@ namespace osu.Game.Screens.SelectV2
|
||||
},
|
||||
},
|
||||
},
|
||||
new Container
|
||||
{
|
||||
Anchor = Anchor.CentreRight,
|
||||
Origin = Anchor.CentreRight,
|
||||
Size = new Vector2(128f, 30f),
|
||||
Child = selectedModsToggle = new ShearedToggleButton
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Text = @"Selected Mods",
|
||||
Height = 30,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user