1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-23 02:57:25 +08:00

Reorder StatisticsItem constructor to make a touch more sense

This commit is contained in:
Dean Herbert 2022-02-02 23:02:38 +09:00
parent 3c2a6fe208
commit 19eb9ad8a7
4 changed files with 34 additions and 41 deletions

View File

@ -370,23 +370,21 @@ namespace osu.Game.Rulesets.Mania
{
Columns = new[]
{
new StatisticItem("Timing Distribution", true,
() => new HitEventTimingDistributionGraph(score.HitEvents)
{
RelativeSizeAxes = Axes.X,
Height = 250
}),
new StatisticItem("Timing Distribution", () => new HitEventTimingDistributionGraph(score.HitEvents)
{
RelativeSizeAxes = Axes.X,
Height = 250
}, true),
}
},
new StatisticRow
{
Columns = new[]
{
new StatisticItem(string.Empty, true,
() => new SimpleStatisticTable(3, new SimpleStatisticItem[]
{
new UnstableRate(score.HitEvents)
}))
new StatisticItem(string.Empty, () => new SimpleStatisticTable(3, new SimpleStatisticItem[]
{
new UnstableRate(score.HitEvents)
}), true)
}
}
};

View File

@ -277,35 +277,32 @@ namespace osu.Game.Rulesets.Osu
{
Columns = new[]
{
new StatisticItem("Timing Distribution", true,
() => new HitEventTimingDistributionGraph(timedHitEvents)
{
RelativeSizeAxes = Axes.X,
Height = 250
}),
new StatisticItem("Timing Distribution", () => new HitEventTimingDistributionGraph(timedHitEvents)
{
RelativeSizeAxes = Axes.X,
Height = 250
}, true),
}
},
new StatisticRow
{
Columns = new[]
{
new StatisticItem("Accuracy Heatmap", true,
() => new AccuracyHeatmap(score, playableBeatmap)
{
RelativeSizeAxes = Axes.X,
Height = 250
}),
new StatisticItem("Accuracy Heatmap", () => new AccuracyHeatmap(score, playableBeatmap)
{
RelativeSizeAxes = Axes.X,
Height = 250
}, true),
}
},
new StatisticRow
{
Columns = new[]
{
new StatisticItem(string.Empty, true,
() => new SimpleStatisticTable(3, new SimpleStatisticItem[]
{
new UnstableRate(timedHitEvents)
}))
new StatisticItem(string.Empty, () => new SimpleStatisticTable(3, new SimpleStatisticItem[]
{
new UnstableRate(timedHitEvents)
}), true)
}
}
};

View File

@ -213,23 +213,21 @@ namespace osu.Game.Rulesets.Taiko
{
Columns = new[]
{
new StatisticItem("Timing Distribution", true,
() => new HitEventTimingDistributionGraph(timedHitEvents)
{
RelativeSizeAxes = Axes.X,
Height = 250
}),
new StatisticItem("Timing Distribution", () => new HitEventTimingDistributionGraph(timedHitEvents)
{
RelativeSizeAxes = Axes.X,
Height = 250
}, true),
}
},
new StatisticRow
{
Columns = new[]
{
new StatisticItem(string.Empty, true,
() => new SimpleStatisticTable(3, new SimpleStatisticItem[]
{
new UnstableRate(timedHitEvents)
}))
new StatisticItem(string.Empty, () => new SimpleStatisticTable(3, new SimpleStatisticItem[]
{
new UnstableRate(timedHitEvents)
}), true)
}
}
};

View File

@ -37,10 +37,10 @@ namespace osu.Game.Screens.Ranking.Statistics
/// Creates a new <see cref="StatisticItem"/>, to be displayed inside a <see cref="StatisticRow"/> in the results screen.
/// </summary>
/// <param name="name">The name of the item. Can be <see cref="string.Empty"/> to hide the item header.</param>
/// <param name="requiresHitEvents">Whether this item requires hit events. If true, <see cref="CreateContent"/> will not be called if no hit events are available.</param>
/// <param name="createContent">A function returning the <see cref="Drawable"/> content to be displayed.</param>
/// <param name="requiresHitEvents">Whether this item requires hit events. If true, <see cref="CreateContent"/> will not be called if no hit events are available.</param>
/// <param name="dimension">The <see cref="Dimension"/> of this item. This can be thought of as the column dimension of an encompassing <see cref="GridContainer"/>.</param>
public StatisticItem([NotNull] string name, bool requiresHitEvents, [NotNull] Func<Drawable> createContent, [CanBeNull] Dimension dimension = null)
public StatisticItem([NotNull] string name, [NotNull] Func<Drawable> createContent, bool requiresHitEvents = false, [CanBeNull] Dimension dimension = null)
{
Name = name;
RequiresHitEvents = requiresHitEvents;