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:
commit
dbdaddfbcc
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user