mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 18:23:04 +08:00
Fix intermittent failure in certain beatmap carousel tests
This commit is contained in:
parent
b3d4da8fc9
commit
112cf403ec
@ -21,6 +21,8 @@ namespace osu.Game.Screens.Select.Carousel
|
|||||||
|
|
||||||
private readonly CarouselBeatmapSet carouselSet;
|
private readonly CarouselBeatmapSet carouselSet;
|
||||||
|
|
||||||
|
private FillFlowContainer<DifficultyIcon> iconFlow = null!;
|
||||||
|
|
||||||
public SetPanelContent(CarouselBeatmapSet carouselSet)
|
public SetPanelContent(CarouselBeatmapSet carouselSet)
|
||||||
{
|
{
|
||||||
this.carouselSet = carouselSet;
|
this.carouselSet = carouselSet;
|
||||||
@ -82,13 +84,12 @@ namespace osu.Game.Screens.Select.Carousel
|
|||||||
TextPadding = new MarginPadding { Horizontal = 8, Vertical = 2 },
|
TextPadding = new MarginPadding { Horizontal = 8, Vertical = 2 },
|
||||||
Status = beatmapSet.Status
|
Status = beatmapSet.Status
|
||||||
},
|
},
|
||||||
new FillFlowContainer<DifficultyIcon>
|
iconFlow = new FillFlowContainer<DifficultyIcon>
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
Origin = Anchor.CentreLeft,
|
Origin = Anchor.CentreLeft,
|
||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
Spacing = new Vector2(3),
|
Spacing = new Vector2(3),
|
||||||
ChildrenEnumerable = getDifficultyIcons(),
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -96,6 +97,12 @@ namespace osu.Game.Screens.Select.Carousel
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
iconFlow.ChildrenEnumerable = getDifficultyIcons();
|
||||||
|
}
|
||||||
|
|
||||||
private const int maximum_difficulty_icons = 18;
|
private const int maximum_difficulty_icons = 18;
|
||||||
|
|
||||||
private IEnumerable<DifficultyIcon> getDifficultyIcons()
|
private IEnumerable<DifficultyIcon> getDifficultyIcons()
|
||||||
|
Loading…
Reference in New Issue
Block a user