mirror of
https://github.com/ppy/osu.git
synced 2025-01-25 05:42:59 +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>
|
/// <summary>
|
||||||
/// "Attribute"
|
/// "Attribute"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static LocalisableString Attribute => new TranslatableString(getKey(@"attribute"), "Attribute");
|
public static LocalisableString Attribute => new TranslatableString(getKey(@"attribute"), @"Attribute");
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// "The attribute to be displayed."
|
/// "The attribute to be displayed."
|
||||||
/// </summary>
|
/// </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>
|
/// <summary>
|
||||||
/// "Template"
|
/// "Template"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static LocalisableString Template => new TranslatableString(getKey(@"template"), "Template");
|
public static LocalisableString Template => new TranslatableString(getKey(@"template"), @"Template");
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// "Supports {{Label}} and {{Value}}, but also including arbitrary attributes like {{StarRating}} (see attribute list for supported values)."
|
/// "Supports {{Label}} and {{Value}}, but also including arbitrary attributes like {{StarRating}} (see attribute list for supported values)."
|
||||||
/// </summary>
|
/// </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).");
|
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.Localisation.SkinComponents;
|
||||||
using osu.Game.Resources.Localisation.Web;
|
using osu.Game.Resources.Localisation.Web;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
|
using osu.Game.Rulesets.Difficulty;
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
using osu.Game.Utils;
|
using osu.Game.Utils;
|
||||||
|
|
||||||
@ -167,6 +168,9 @@ namespace osu.Game.Skinning.Components
|
|||||||
case BeatmapAttribute.BPM:
|
case BeatmapAttribute.BPM:
|
||||||
return BeatmapsetsStrings.ShowStatsBpm;
|
return BeatmapsetsStrings.ShowStatsBpm;
|
||||||
|
|
||||||
|
case BeatmapAttribute.MaxPP:
|
||||||
|
return BeatmapAttributeTextStrings.MaxPP;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new ArgumentOutOfRangeException();
|
throw new ArgumentOutOfRangeException();
|
||||||
}
|
}
|
||||||
@ -217,6 +221,11 @@ namespace osu.Game.Skinning.Components
|
|||||||
? starDifficulty.Stars.ToLocalisableString(@"F2")
|
? starDifficulty.Stars.ToLocalisableString(@"F2")
|
||||||
: @"...";
|
: @"...";
|
||||||
|
|
||||||
|
case BeatmapAttribute.MaxPP:
|
||||||
|
return difficultyBindable?.Value?.PerformanceAttributes is PerformanceAttributes attributes
|
||||||
|
? attributes.Total.ToLocalisableString(@"F2")
|
||||||
|
: @"...";
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new ArgumentOutOfRangeException();
|
throw new ArgumentOutOfRangeException();
|
||||||
}
|
}
|
||||||
@ -269,5 +278,6 @@ namespace osu.Game.Skinning.Components
|
|||||||
RankedStatus,
|
RankedStatus,
|
||||||
BPM,
|
BPM,
|
||||||
Source,
|
Source,
|
||||||
|
MaxPP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user