mirror of https://github.com/ppy/osu
Sum up totals for hit results with the same name
This commit is contained in:
parent
511f0e99b3
commit
285756802c
|
@ -170,15 +170,20 @@ private Drawable[] createContent(int index, ScoreInfo score)
|
|||
|
||||
foreach (var (columnName, resultTypes) in statisticResults)
|
||||
{
|
||||
HitResultDisplayStatistic stat = new HitResultDisplayStatistic(resultTypes.First(), 0, null, columnName);
|
||||
int count = 0;
|
||||
int? maxCount = null;
|
||||
|
||||
if (availableStatistics.Contains(columnName))
|
||||
{
|
||||
maxCount = 0;
|
||||
foreach (var s in availableStatistics[columnName])
|
||||
stat = s;
|
||||
{
|
||||
count += s.Count;
|
||||
maxCount += s.MaxCount;
|
||||
}
|
||||
}
|
||||
|
||||
content.Add(new StatisticText(stat.Count, stat.MaxCount, @"N0") { Colour = stat.Count == 0 ? Color4.Gray : Color4.White });
|
||||
content.Add(new StatisticText(count, maxCount, @"N0") { Colour = count == 0 ? Color4.Gray : Color4.White });
|
||||
}
|
||||
|
||||
if (showPerformancePoints)
|
||||
|
|
Loading…
Reference in New Issue