mirror of
https://github.com/ppy/osu.git
synced 2025-01-25 00:32:58 +08:00
Add max performance beatmap attribute text
This commit is contained in:
parent
bfcf6693ca
commit
6749768b9e
@ -12,23 +12,28 @@ namespace osu.Game.Localisation.SkinComponents
|
||||
/// <summary>
|
||||
/// "Attribute"
|
||||
/// </summary>
|
||||
public static LocalisableString Attribute => new TranslatableString(getKey(@"attribute"), "Attribute");
|
||||
public static LocalisableString Attribute => new TranslatableString(getKey(@"attribute"), @"Attribute");
|
||||
|
||||
/// <summary>
|
||||
/// "The attribute to be displayed."
|
||||
/// </summary>
|
||||
public static LocalisableString AttributeDescription => new TranslatableString(getKey(@"attribute_description"), "The attribute to be displayed.");
|
||||
public static LocalisableString AttributeDescription => new TranslatableString(getKey(@"attribute_description"), @"The attribute to be displayed.");
|
||||
|
||||
/// <summary>
|
||||
/// "Template"
|
||||
/// </summary>
|
||||
public static LocalisableString Template => new TranslatableString(getKey(@"template"), "Template");
|
||||
public static LocalisableString Template => new TranslatableString(getKey(@"template"), @"Template");
|
||||
|
||||
/// <summary>
|
||||
/// "Supports {{Label}} and {{Value}}, but also including arbitrary attributes like {{StarRating}} (see attribute list for supported values)."
|
||||
/// </summary>
|
||||
public static LocalisableString TemplateDescription => new TranslatableString(getKey(@"template_description"), @"Supports {{Label}} and {{Value}}, but also including arbitrary attributes like {{StarRating}} (see attribute list for supported values).");
|
||||
|
||||
private static string getKey(string key) => $"{prefix}:{key}";
|
||||
/// <summary>
|
||||
/// "Max PP"
|
||||
/// </summary>
|
||||
public static LocalisableString MaxPP => new TranslatableString(getKey(@"max_pp"), @"Max PP");
|
||||
|
||||
private static string getKey(string key) => $@"{prefix}:{key}";
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ using osu.Game.Localisation;
|
||||
using osu.Game.Localisation.SkinComponents;
|
||||
using osu.Game.Resources.Localisation.Web;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Rulesets.Difficulty;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Utils;
|
||||
|
||||
@ -167,6 +168,9 @@ namespace osu.Game.Skinning.Components
|
||||
case BeatmapAttribute.BPM:
|
||||
return BeatmapsetsStrings.ShowStatsBpm;
|
||||
|
||||
case BeatmapAttribute.MaxPP:
|
||||
return BeatmapAttributeTextStrings.MaxPP;
|
||||
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
@ -217,6 +221,11 @@ namespace osu.Game.Skinning.Components
|
||||
? starDifficulty.Stars.ToLocalisableString(@"F2")
|
||||
: @"...";
|
||||
|
||||
case BeatmapAttribute.MaxPP:
|
||||
return difficultyBindable?.Value?.PerformanceAttributes is PerformanceAttributes attributes
|
||||
? attributes.Total.ToLocalisableString(@"F2")
|
||||
: @"...";
|
||||
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
@ -269,5 +278,6 @@ namespace osu.Game.Skinning.Components
|
||||
RankedStatus,
|
||||
BPM,
|
||||
Source,
|
||||
MaxPP
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user