1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-18 06:27:18 +08:00

Fix mod selector overflowing from beatmap info overlay

This commit is contained in:
Joseph Madamba 2021-07-24 14:44:22 -07:00
parent 8eb4261406
commit f6d4ead32a

View File

@ -26,12 +26,14 @@ namespace osu.Game.Overlays.BeatmapSet
public LeaderboardModSelector()
{
AutoSizeAxes = Axes.Both;
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
InternalChild = modsContainer = new FillFlowContainer<ModButton>
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
AutoSizeAxes = Axes.Both,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Full,
Spacing = new Vector2(4),
};
@ -54,7 +56,12 @@ namespace osu.Game.Overlays.BeatmapSet
modsContainer.Add(new ModButton(new ModNoMod()));
modsContainer.AddRange(ruleset.NewValue.CreateInstance().GetAllMods().Where(m => m.UserPlayable).Select(m => new ModButton(m)));
modsContainer.ForEach(button => button.OnSelectionChanged = selectionChanged);
modsContainer.ForEach(button =>
{
button.Anchor = Anchor.TopCentre;
button.Origin = Anchor.TopCentre;
button.OnSelectionChanged = selectionChanged;
});
}
protected override bool OnHover(HoverEvent e)