mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Include PropertyName in PerformanceDisplayAttribute
This commit is contained in:
@ -21,7 +21,7 @@ namespace osu.Game.Rulesets.Difficulty
|
||||
/// <returns></returns>
|
||||
public virtual IEnumerable<PerformanceDisplayAttribute> GetAttributesForDisplay()
|
||||
{
|
||||
yield return new PerformanceDisplayAttribute("Total", Total);
|
||||
yield return new PerformanceDisplayAttribute(nameof(Total), "Total", Total);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,11 @@ namespace osu.Game.Rulesets.Difficulty
|
||||
/// </summary>
|
||||
public class PerformanceDisplayAttribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Name of the attribute property in <see cref="PerformanceAttributes"/>.
|
||||
/// </summary>
|
||||
public string PropertyName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// A custom display name for the attribute.
|
||||
/// </summary>
|
||||
@ -17,8 +22,9 @@ namespace osu.Game.Rulesets.Difficulty
|
||||
/// </summary>
|
||||
public double Value { get; }
|
||||
|
||||
public PerformanceDisplayAttribute(string displayName, double value)
|
||||
public PerformanceDisplayAttribute(string propertyName, string displayName, double value)
|
||||
{
|
||||
PropertyName = propertyName;
|
||||
DisplayName = displayName;
|
||||
Value = value;
|
||||
}
|
||||
|
Reference in New Issue
Block a user