mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Introduce IStatisticRow interface
This commit is contained in:
@ -96,27 +96,9 @@ namespace osu.Game.Screens.Ranking.Statistics
|
||||
Spacing = new Vector2(30, 15),
|
||||
};
|
||||
|
||||
foreach (var row in newScore.Ruleset.CreateInstance().CreateStatisticsForScore(newScore, playableBeatmap))
|
||||
{
|
||||
rows.Add(new GridContainer
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Content = new[]
|
||||
{
|
||||
row.Columns?.Select(c => new StatisticContainer(c)
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
}).Cast<Drawable>().ToArray()
|
||||
},
|
||||
ColumnDimensions = Enumerable.Range(0, row.Columns?.Length ?? 0)
|
||||
.Select(i => row.Columns[i].Dimension ?? new Dimension()).ToArray(),
|
||||
RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize) }
|
||||
});
|
||||
}
|
||||
rows.AddRange(newScore.Ruleset.CreateInstance()
|
||||
.CreateStatisticsForScore(newScore, playableBeatmap)
|
||||
.Select(row => row.CreateDrawableStatisticRow()));
|
||||
|
||||
LoadComponentAsync(rows, d =>
|
||||
{
|
||||
|
Reference in New Issue
Block a user