1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-06 21:12:55 +08:00

Add support for dual-column advanced stats

This commit is contained in:
Dean Herbert 2023-12-19 19:09:47 +09:00
parent 1161e0ad0e
commit 0a64d631e2
No known key found for this signature in database

View File

@ -64,21 +64,43 @@ namespace osu.Game.Screens.Select.Details
} }
} }
public AdvancedStats() public AdvancedStats(int columns = 1)
{ {
Child = new FillFlowContainer switch (columns)
{ {
RelativeSizeAxes = Axes.X, case 1:
AutoSizeAxes = Axes.Y, Child = new FillFlowContainer
Children = new[] {
{ RelativeSizeAxes = Axes.X,
FirstValue = new StatisticRow(), // circle size/key amount AutoSizeAxes = Axes.Y,
HpDrain = new StatisticRow { Title = BeatmapsetsStrings.ShowStatsDrain }, Children = new[]
Accuracy = new StatisticRow { Title = BeatmapsetsStrings.ShowStatsAccuracy }, {
ApproachRate = new StatisticRow { Title = BeatmapsetsStrings.ShowStatsAr }, FirstValue = new StatisticRow(), // circle size/key amount
starDifficulty = new StatisticRow(10, true) { Title = BeatmapsetsStrings.ShowStatsStars }, HpDrain = new StatisticRow { Title = BeatmapsetsStrings.ShowStatsDrain },
}, Accuracy = new StatisticRow { Title = BeatmapsetsStrings.ShowStatsAccuracy },
}; ApproachRate = new StatisticRow { Title = BeatmapsetsStrings.ShowStatsAr },
starDifficulty = new StatisticRow(10, true) { Title = BeatmapsetsStrings.ShowStatsStars },
},
};
break;
case 2:
Child = new FillFlowContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Full,
Children = new[]
{
FirstValue = new StatisticRow { Width = 0.5f }, // circle size/key amount
HpDrain = new StatisticRow { Title = BeatmapsetsStrings.ShowStatsDrain, Width = 0.5f },
Accuracy = new StatisticRow { Title = BeatmapsetsStrings.ShowStatsAccuracy, Width = 0.5f },
ApproachRate = new StatisticRow { Title = BeatmapsetsStrings.ShowStatsAr, Width = 0.5f },
starDifficulty = new StatisticRow(10, true) { Title = BeatmapsetsStrings.ShowStatsStars, Width = 0.5f },
},
};
break;
}
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]