From 2bc3464802c75a45ee5cfc852de2acd0e618d8fb Mon Sep 17 00:00:00 2001 From: ekrctb Date: Thu, 17 Jan 2019 17:27:34 +0900 Subject: [PATCH 1/2] Hide Room tab when Settings tab is active --- osu.Game/Screens/Multi/Match/MatchSubScreen.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Multi/Match/MatchSubScreen.cs b/osu.Game/Screens/Multi/Match/MatchSubScreen.cs index 14cdd90128..bc3b2c74d4 100644 --- a/osu.Game/Screens/Multi/Match/MatchSubScreen.cs +++ b/osu.Game/Screens/Multi/Match/MatchSubScreen.cs @@ -51,6 +51,8 @@ namespace osu.Game.Screens.Multi.Match MatchChatDisplay chat; Components.Header header; + Info info; + GridContainer bottomRow; MatchSettingsOverlay settings; Children = new Drawable[] @@ -61,10 +63,10 @@ namespace osu.Game.Screens.Multi.Match Content = new[] { new Drawable[] { header = new Components.Header(room) { Depth = -1 } }, - new Drawable[] { new Info(room) { OnStart = onStart } }, + new Drawable[] { info = new Info(room) { OnStart = onStart } }, new Drawable[] { - new GridContainer + bottomRow = new GridContainer { RelativeSizeAxes = Axes.Both, Content = new[] @@ -110,9 +112,17 @@ namespace osu.Game.Screens.Multi.Match header.Tabs.Current.ValueChanged += t => { if (t is SettingsMatchPage) + { settings.Show(); + info.Hide(); + bottomRow.Hide(); + } else + { settings.Hide(); + info.Show(); + bottomRow.Show(); + } }; chat.Exit += Exit; From 491537b8ba7c9e2a5fc408a56f931d7937c5de69 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 17 Jan 2019 18:13:05 +0900 Subject: [PATCH 2/2] Add fade duration Not really visible in the existing usage, but once we enable the settings tab it will be required. Tested by manually enabling it. --- osu.Game/Screens/Multi/Match/MatchSubScreen.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/osu.Game/Screens/Multi/Match/MatchSubScreen.cs b/osu.Game/Screens/Multi/Match/MatchSubScreen.cs index bc3b2c74d4..a7932e1131 100644 --- a/osu.Game/Screens/Multi/Match/MatchSubScreen.cs +++ b/osu.Game/Screens/Multi/Match/MatchSubScreen.cs @@ -111,17 +111,18 @@ namespace osu.Game.Screens.Multi.Match header.OnRequestSelectBeatmap = () => Push(new MatchSongSelect { Selected = addPlaylistItem }); header.Tabs.Current.ValueChanged += t => { + const float fade_duration = 500; if (t is SettingsMatchPage) { settings.Show(); - info.Hide(); - bottomRow.Hide(); + info.FadeOut(fade_duration, Easing.OutQuint); + bottomRow.FadeOut(fade_duration, Easing.OutQuint); } else { settings.Hide(); - info.Show(); - bottomRow.Show(); + info.FadeIn(fade_duration, Easing.OutQuint); + bottomRow.FadeIn(fade_duration, Easing.OutQuint); } };