1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 23:52:57 +08:00

Clarify usages of reverse child ID flow with inline comments

This commit is contained in:
Bartłomiej Dach 2021-12-06 21:00:26 +01:00
parent 82ed8eae6b
commit 999bba439f
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497
4 changed files with 7 additions and 0 deletions

View File

@ -151,6 +151,7 @@ namespace osu.Game.Overlays
}
// spawn new children with the contained so we only clear old content at the last moment.
// reverse ID flow is required for correct Z-ordering of the cards' expandable content (last card should be front-most).
var content = new ReverseChildIDFillFlowContainer<BeatmapCard>
{
RelativeSizeAxes = Axes.X,

View File

@ -80,6 +80,8 @@ namespace osu.Game.Overlays.Profile
}
}
},
// reverse ID flow is required for correct Z-ordering of the content (last item should be front-most).
// particularly important in BeatmapsSection, as it uses beatmap cards, which have expandable overhanging content.
content = new ReverseChildIDFillFlowContainer<Drawable>
{
Direction = FillDirection.Vertical,

View File

@ -49,11 +49,14 @@ namespace osu.Game.Overlays.Profile.Sections
Direction = FillDirection.Vertical,
Children = new Drawable[]
{
// reverse ID flow is required for correct Z-ordering of the items (last item should be front-most).
// particularly important in PaginatedBeatmapContainer, as it uses beatmap cards, which have expandable overhanging content.
ItemsContainer = new ReverseChildIDFillFlowContainer<Drawable>
{
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
Spacing = new Vector2(0, 2),
// ensure the container and its contents are in front of the "more" button.
Depth = float.MinValue
},
moreButton = new ShowMoreButton

View File

@ -135,6 +135,7 @@ namespace osu.Game.Overlays.Rankings
Children = new Drawable[]
{
new ScoresTable(1, response.Users),
// reverse ID flow is required for correct Z-ordering of the cards' expandable content (last card should be front-most).
new ReverseChildIDFillFlowContainer<BeatmapCard>
{
AutoSizeAxes = Axes.Y,