Display performance breakdown in a tooltip

This commit is contained in:
Henry Lin
2022-01-17 18:28:17 +08:00
parent 2ad0ea35be
commit 511a607599
8 changed files with 172 additions and 17 deletions

View File

@ -1,6 +1,7 @@
// 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.Collections.Generic;
using Newtonsoft.Json;
using osu.Game.Rulesets.Difficulty;
@ -22,5 +23,17 @@ namespace osu.Game.Rulesets.Osu.Difficulty
[JsonProperty("effective_miss_count")]
public double EffectiveMissCount { get; set; }
public override IEnumerable<PerformanceDisplayAttribute> GetAttributesForDisplay()
{
foreach (var attribute in base.GetAttributesForDisplay())
yield return attribute;
yield return new PerformanceDisplayAttribute("Aim", Aim);
yield return new PerformanceDisplayAttribute("Speed", Speed);
yield return new PerformanceDisplayAttribute("Accuracy", Accuracy);
yield return new PerformanceDisplayAttribute("Flashlight Bonus", Flashlight);
yield return new PerformanceDisplayAttribute("Effective Miss Count", EffectiveMissCount);
}
}
}