Fix mod select overlay overflowing toolbar at max ui scale

This commit is contained in:
Joehu
2020-02-01 11:24:29 -08:00
parent c904ae485a
commit 2d42a83bb9
2 changed files with 29 additions and 16 deletions

View File

@ -66,7 +66,6 @@ namespace osu.Game.Overlays.Mods
Waves.ThirdWaveColour = OsuColour.FromHex(@"005774"); Waves.ThirdWaveColour = OsuColour.FromHex(@"005774");
Waves.FourthWaveColour = OsuColour.FromHex(@"003a4e"); Waves.FourthWaveColour = OsuColour.FromHex(@"003a4e");
Height = 510;
Padding = new MarginPadding { Horizontal = -OsuScreen.HORIZONTAL_OVERFLOW_PADDING }; Padding = new MarginPadding { Horizontal = -OsuScreen.HORIZONTAL_OVERFLOW_PADDING };
Children = new Drawable[] Children = new Drawable[]
@ -85,8 +84,7 @@ namespace osu.Game.Overlays.Mods
new Triangles new Triangles
{ {
TriangleScale = 5, TriangleScale = 5,
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.Both,
Height = Height, //set the height from the start to ensure correct triangle density.
ColourLight = new Color4(53, 66, 82, 255), ColourLight = new Color4(53, 66, 82, 255),
ColourDark = new Color4(41, 54, 70, 255), ColourDark = new Color4(41, 54, 70, 255),
}, },

View File

@ -221,23 +221,38 @@ namespace osu.Game.Screens.Select
if (ShowFooter) if (ShowFooter)
{ {
AddRangeInternal(new[] AddRangeInternal(new Drawable[]
{ {
FooterPanels = new Container new GridContainer // used for max width implementation
{ {
Anchor = Anchor.BottomLeft, RelativeSizeAxes = Axes.Both,
Origin = Anchor.BottomLeft, RowDimensions = new[]
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Margin = new MarginPadding { Bottom = Footer.HEIGHT },
Children = new Drawable[]
{ {
BeatmapOptions = new BeatmapOptionsOverlay(), new Dimension(),
ModSelect = new ModSelectOverlay new Dimension(GridSizeMode.Relative, 1f, maxSize: 560),
},
Content = new[]
{
null,
new Drawable[]
{ {
RelativeSizeAxes = Axes.X, FooterPanels = new Container
Origin = Anchor.BottomCentre, {
Anchor = Anchor.BottomCentre, Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Bottom = Footer.HEIGHT },
Children = new Drawable[]
{
BeatmapOptions = new BeatmapOptionsOverlay(),
ModSelect = new ModSelectOverlay
{
RelativeSizeAxes = Axes.Both,
Origin = Anchor.BottomCentre,
Anchor = Anchor.BottomCentre,
}
}
}
} }
} }
}, },