1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-23 02:22: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,8 +64,11 @@ namespace osu.Game.Screens.Select.Details
} }
} }
public AdvancedStats() public AdvancedStats(int columns = 1)
{ {
switch (columns)
{
case 1:
Child = new FillFlowContainer Child = new FillFlowContainer
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
@ -79,6 +82,25 @@ namespace osu.Game.Screens.Select.Details
starDifficulty = new StatisticRow(10, true) { Title = BeatmapsetsStrings.ShowStatsStars }, 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]