mirror of
https://github.com/ppy/osu
synced 2024-12-15 03:16:17 +00:00
Hook up score totals display to daily challenge screen
This commit is contained in:
parent
1ad0b31217
commit
2e37f3b5de
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user