1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 09:32:55 +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
commit dbdaddfbcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)