Sum up totals for hit results with the same name

This commit is contained in:
Jonas Brandstötter 2024-10-14 16:33:30 +02:00
parent 511f0e99b3
commit 285756802c
No known key found for this signature in database
GPG Key ID: DF758C8A6271E098
1 changed files with 8 additions and 3 deletions

View File

@ -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)