1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-06 04:13:11 +08:00

Merge branch 'master' into beatmap-overlay-header

This commit is contained in:
Dan Balasescu 2020-02-04 13:13:57 +09:00 committed by GitHub
commit 634364863d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 32 additions and 18 deletions

View File

@ -60,7 +60,6 @@ namespace osu.Game.Tests.Visual.UserInterface
{ {
modSelect = new TestModSelectOverlay modSelect = new TestModSelectOverlay
{ {
RelativeSizeAxes = Axes.X,
Origin = Anchor.BottomCentre, Origin = Anchor.BottomCentre,
Anchor = Anchor.BottomCentre, Anchor = Anchor.BottomCentre,
SelectedMods = { BindTarget = SelectedMods } SelectedMods = { BindTarget = SelectedMods }

View File

@ -79,7 +79,6 @@ namespace osu.Game.Tests.Visual.UserInterface
{ {
Child = modSelect = new TestModSelectOverlay Child = modSelect = new TestModSelectOverlay
{ {
RelativeSizeAxes = Axes.X,
Origin = Anchor.BottomCentre, Origin = Anchor.BottomCentre,
Anchor = Anchor.BottomCentre, Anchor = Anchor.BottomCentre,
SelectedMods = { BindTarget = SelectedMods } SelectedMods = { BindTarget = SelectedMods }

View File

@ -30,6 +30,8 @@ namespace osu.Game.Overlays.Mods
{ {
public class ModSelectOverlay : WaveOverlayContainer public class ModSelectOverlay : WaveOverlayContainer
{ {
public const float HEIGHT = 510;
protected readonly TriangleButton DeselectAllButton; protected readonly TriangleButton DeselectAllButton;
protected readonly TriangleButton CustomiseButton; protected readonly TriangleButton CustomiseButton;
protected readonly TriangleButton CloseButton; protected readonly TriangleButton CloseButton;
@ -66,7 +68,8 @@ 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; RelativeSizeAxes = Axes.Both;
Padding = new MarginPadding { Horizontal = -OsuScreen.HORIZONTAL_OVERFLOW_PADDING }; Padding = new MarginPadding { Horizontal = -OsuScreen.HORIZONTAL_OVERFLOW_PADDING };
Children = new Drawable[] Children = new Drawable[]
@ -85,8 +88,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

@ -224,23 +224,37 @@ namespace osu.Game.Screens.Select
if (ShowFooter) if (ShowFooter)
{ {
AddRangeInternal(new[] AddRangeInternal(new Drawable[]
{ {
FooterPanels = new Container new GridContainer // used for max height 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: ModSelectOverlay.HEIGHT + Footer.HEIGHT),
},
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
{
Origin = Anchor.BottomCentre,
Anchor = Anchor.BottomCentre,
}
}
}
} }
} }
}, },