mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 19:52:55 +08:00
Remove more GridContainer
nonsense
This commit is contained in:
parent
8c4831e09f
commit
98bf15182e
@ -26,18 +26,13 @@ namespace osu.Game.Screens.Ranking.Statistics
|
||||
RelativeSizeAxes = Axes.X;
|
||||
AutoSizeAxes = Axes.Y;
|
||||
|
||||
InternalChild = new GridContainer
|
||||
InternalChild = new FillFlowContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Content = new[]
|
||||
{
|
||||
new[]
|
||||
{
|
||||
createHeader(item)
|
||||
},
|
||||
new Drawable[]
|
||||
Children = new[]
|
||||
{
|
||||
createHeader(item),
|
||||
new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
@ -45,12 +40,6 @@ namespace osu.Game.Screens.Ranking.Statistics
|
||||
Margin = new MarginPadding { Top = 15 },
|
||||
Child = item.CreateContent()
|
||||
}
|
||||
},
|
||||
},
|
||||
RowDimensions = new[]
|
||||
{
|
||||
new Dimension(GridSizeMode.AutoSize),
|
||||
new Dimension(GridSizeMode.AutoSize),
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ namespace osu.Game.Screens.Ranking.Statistics
|
||||
}
|
||||
else
|
||||
{
|
||||
FillFlowContainer rows;
|
||||
FillFlowContainer flow;
|
||||
container = new OsuScrollContainer(Direction.Vertical)
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
@ -133,11 +133,12 @@ namespace osu.Game.Screens.Ranking.Statistics
|
||||
Alpha = 0,
|
||||
Children = new[]
|
||||
{
|
||||
rows = new FillFlowContainer
|
||||
flow = new FillFlowContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Spacing = new Vector2(30, 15)
|
||||
Spacing = new Vector2(30, 15),
|
||||
Direction = FillDirection.Full,
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -146,35 +147,22 @@ namespace osu.Game.Screens.Ranking.Statistics
|
||||
|
||||
foreach (var item in statisticItems)
|
||||
{
|
||||
var columnContent = new List<Drawable>();
|
||||
|
||||
if (!hitEventsAvailable && item.RequiresHitEvents)
|
||||
{
|
||||
anyRequiredHitEvents = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
columnContent.Add(new StatisticContainer(item)
|
||||
flow.Add(new StatisticContainer(item)
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
});
|
||||
|
||||
rows.Add(new GridContainer
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Content = new[] { columnContent.ToArray() },
|
||||
ColumnDimensions = new[] { new Dimension() },
|
||||
RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize) }
|
||||
});
|
||||
}
|
||||
|
||||
if (anyRequiredHitEvents)
|
||||
{
|
||||
rows.Add(new FillFlowContainer
|
||||
flow.Add(new FillFlowContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
|
Loading…
Reference in New Issue
Block a user