mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 12:02:54 +08:00
Add protected method for customising statistics panel rows
This commit is contained in:
parent
600ada46be
commit
3abdf557ea
@ -100,7 +100,7 @@ namespace osu.Game.Screens.Ranking.Statistics
|
||||
bool hitEventsAvailable = newScore.HitEvents.Count != 0;
|
||||
Container<Drawable> container;
|
||||
|
||||
var statisticRows = newScore.Ruleset.CreateInstance().CreateStatisticsForScore(newScore, task.GetResultSafely());
|
||||
var statisticRows = CreateStatisticRows(newScore, task.GetResultSafely());
|
||||
|
||||
if (!hitEventsAvailable && statisticRows.SelectMany(r => r.Columns).All(c => c.RequiresHitEvents))
|
||||
{
|
||||
@ -218,6 +218,14 @@ namespace osu.Game.Screens.Ranking.Statistics
|
||||
}), localCancellationSource.Token);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the <see cref="StatisticRow"/>s to be displayed in this panel for a given <paramref name="newScore"/>.
|
||||
/// </summary>
|
||||
/// <param name="newScore">The score to create the rows for.</param>
|
||||
/// <param name="playableBeatmap">The beatmap on which the score was set.</param>
|
||||
protected virtual ICollection<StatisticRow> CreateStatisticRows(ScoreInfo newScore, IBeatmap playableBeatmap)
|
||||
=> newScore.Ruleset.CreateInstance().CreateStatisticsForScore(newScore, playableBeatmap);
|
||||
|
||||
protected override bool OnClick(ClickEvent e)
|
||||
{
|
||||
ToggleVisibility();
|
||||
|
Loading…
Reference in New Issue
Block a user