mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 09:03:50 +09:00
Add protected method for customising statistics panel rows
This commit is contained in:
@ -100,7 +100,7 @@ namespace osu.Game.Screens.Ranking.Statistics
|
|||||||
bool hitEventsAvailable = newScore.HitEvents.Count != 0;
|
bool hitEventsAvailable = newScore.HitEvents.Count != 0;
|
||||||
Container<Drawable> container;
|
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))
|
if (!hitEventsAvailable && statisticRows.SelectMany(r => r.Columns).All(c => c.RequiresHitEvents))
|
||||||
{
|
{
|
||||||
@ -218,6 +218,14 @@ namespace osu.Game.Screens.Ranking.Statistics
|
|||||||
}), localCancellationSource.Token);
|
}), 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)
|
protected override bool OnClick(ClickEvent e)
|
||||||
{
|
{
|
||||||
ToggleVisibility();
|
ToggleVisibility();
|
||||||
|
Reference in New Issue
Block a user