1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-17 07:22:38 +08:00

Merge pull request #14004 from Joehuu/fix-beatmap-info-mod-overflow

Fix mod selector overflowing from beatmap info overlay
This commit is contained in:
Dan Balasescu
2021-07-25 12:21:29 +09:00
committed by GitHub
Unverified
@@ -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)