From 8c4fd44a85785bfa2ac73f86f3487e1a850d932e Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 23 Mar 2017 19:32:58 +0900 Subject: [PATCH] Tidy up song select footer and fix depth of mod select vs osu! cookie. --- osu.Game/Screens/Select/Footer.cs | 6 +++--- osu.Game/Screens/Select/PlaySongSelect.cs | 3 +-- osu.Game/Screens/Select/SongSelect.cs | 16 ++++++++++++++-- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/osu.Game/Screens/Select/Footer.cs b/osu.Game/Screens/Select/Footer.cs index 36030f5de4..c86ea2f30e 100644 --- a/osu.Game/Screens/Select/Footer.cs +++ b/osu.Game/Screens/Select/Footer.cs @@ -22,6 +22,8 @@ namespace osu.Game.Screens.Select private const float play_song_select_button_width = 100; private const float play_song_select_button_height = 50; + public const float HEIGHT = 50; + public const int TRANSITION_LENGTH = 300; private const float padding = 80; @@ -69,10 +71,8 @@ namespace osu.Game.Screens.Select { AlwaysReceiveInput = true; - const float bottom_tool_height = 50; - RelativeSizeAxes = Axes.X; - Height = bottom_tool_height; + Height = HEIGHT; Anchor = Anchor.BottomCentre; Origin = Anchor.BottomCentre; Children = new Drawable[] diff --git a/osu.Game/Screens/Select/PlaySongSelect.cs b/osu.Game/Screens/Select/PlaySongSelect.cs index e3a6371c27..f483aa00f7 100644 --- a/osu.Game/Screens/Select/PlaySongSelect.cs +++ b/osu.Game/Screens/Select/PlaySongSelect.cs @@ -22,12 +22,11 @@ namespace osu.Game.Screens.Select public PlaySongSelect() { - Add(modSelect = new ModSelectOverlay + FooterPanels.Add(modSelect = new ModSelectOverlay { RelativeSizeAxes = Axes.X, Origin = Anchor.BottomCentre, Anchor = Anchor.BottomCentre, - Margin = new MarginPadding { Bottom = 50 } }); LeftContent.Add(beatmapDetails = new BeatmapDetailArea diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs index 1e7532b8a6..49762331c4 100644 --- a/osu.Game/Screens/Select/SongSelect.cs +++ b/osu.Game/Screens/Select/SongSelect.cs @@ -65,6 +65,12 @@ namespace osu.Game.Screens.Select /// protected readonly Footer Footer; + /// + /// Contains any panel which is triggered by a footer button. + /// Helps keep them located beneath the footer itself. + /// + protected readonly Container FooterPanels; + public readonly FilterControl FilterControl; protected SongSelect() @@ -131,11 +137,15 @@ namespace osu.Game.Screens.Select if (ShowFooter) { - Add(BeatmapOptions = new BeatmapOptionsOverlay + Add(FooterPanels = new Container { + Anchor = Anchor.BottomLeft, + Origin = Anchor.BottomLeft, + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, Margin = new MarginPadding { - Bottom = 50, + Bottom = Footer.HEIGHT, }, }); Add(Footer = new Footer @@ -143,6 +153,8 @@ namespace osu.Game.Screens.Select OnBack = Exit, OnStart = raiseSelect, }); + + FooterPanels.Add(BeatmapOptions = new BeatmapOptionsOverlay()); } }