1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-28 01:47:33 +08:00

Merge pull request #4079 from ekrctb/hide-multiplayer-match-room-tab

Hide Room tab content when Settings tab is active
This commit is contained in:
Dean Herbert 2019-01-17 18:23:08 +09:00 committed by GitHub
commit 3a7d09d6f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,6 +51,8 @@ namespace osu.Game.Screens.Multi.Match
MatchChatDisplay chat; MatchChatDisplay chat;
Components.Header header; Components.Header header;
Info info;
GridContainer bottomRow;
MatchSettingsOverlay settings; MatchSettingsOverlay settings;
Children = new Drawable[] Children = new Drawable[]
@ -61,10 +63,10 @@ namespace osu.Game.Screens.Multi.Match
Content = new[] Content = new[]
{ {
new Drawable[] { header = new Components.Header(room) { Depth = -1 } }, 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 Drawable[]
{ {
new GridContainer bottomRow = new GridContainer
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Content = new[] Content = new[]
@ -109,10 +111,19 @@ namespace osu.Game.Screens.Multi.Match
header.OnRequestSelectBeatmap = () => Push(new MatchSongSelect { Selected = addPlaylistItem }); header.OnRequestSelectBeatmap = () => Push(new MatchSongSelect { Selected = addPlaylistItem });
header.Tabs.Current.ValueChanged += t => header.Tabs.Current.ValueChanged += t =>
{ {
const float fade_duration = 500;
if (t is SettingsMatchPage) if (t is SettingsMatchPage)
{
settings.Show(); settings.Show();
info.FadeOut(fade_duration, Easing.OutQuint);
bottomRow.FadeOut(fade_duration, Easing.OutQuint);
}
else else
{
settings.Hide(); settings.Hide();
info.FadeIn(fade_duration, Easing.OutQuint);
bottomRow.FadeIn(fade_duration, Easing.OutQuint);
}
}; };
chat.Exit += Exit; chat.Exit += Exit;