1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 17:07:38 +08:00

Hook up score totals display to daily challenge screen

This commit is contained in:
Bartłomiej Dach 2024-07-26 12:34:23 +02:00
parent 1ad0b31217
commit 2e37f3b5de
No known key found for this signature in database

View File

@ -59,6 +59,7 @@ namespace osu.Game.Screens.OnlinePlay.DailyChallenge
private IDisposable? userModsSelectOverlayRegistration;
private DailyChallengeScoreBreakdown breakdown = null!;
private DailyChallengeTotalsDisplay totals = null!;
private DailyChallengeEventFeed feed = null!;
[Cached]
@ -211,6 +212,7 @@ namespace osu.Game.Screens.OnlinePlay.DailyChallenge
{
new DailyChallengeTimeRemainingRing(),
breakdown = new DailyChallengeScoreBreakdown(),
totals = new DailyChallengeTotalsDisplay(),
}
}
},
@ -351,6 +353,7 @@ namespace osu.Game.Screens.OnlinePlay.DailyChallenge
Schedule(() =>
{
breakdown.AddNewScore(ev);
totals.AddNewScore(ev);
feed.AddNewScore(ev);
if (e.NewRank <= 50)
@ -421,7 +424,11 @@ namespace osu.Game.Screens.OnlinePlay.DailyChallenge
var itemStats = stats.SingleOrDefault(item => item.PlaylistItemID == playlistItem.ID);
if (itemStats == null) return;
Schedule(() => breakdown.SetInitialCounts(itemStats.TotalScoreDistribution));
Schedule(() =>
{
breakdown.SetInitialCounts(itemStats.TotalScoreDistribution);
totals.SetInitialCounts(itemStats.TotalScoreDistribution.Sum(c => c), itemStats.TotalPlaylistScore);
});
});
beatmapAvailabilityTracker.SelectedItem.Value = playlistItem;