diff --git a/osu.Game/GameModes/Menu/Intro.cs b/osu.Game/GameModes/Menu/Intro.cs index c107fd0c92..57d3f72ea9 100644 --- a/osu.Game/GameModes/Menu/Intro.cs +++ b/osu.Game/GameModes/Menu/Intro.cs @@ -26,6 +26,8 @@ namespace osu.Game.GameModes.Menu private AudioSample welcome; private AudioTrack bgm; + internal override bool ShowToolbar => (ParentGameMode as OsuGameMode)?.ShowToolbar ?? false; + protected override BackgroundMode CreateBackground() => new BackgroundModeEmpty(); public Intro() diff --git a/osu.Game/GameModes/Menu/MainMenu.cs b/osu.Game/GameModes/Menu/MainMenu.cs index f4b9da2bfe..b9007ab7ab 100644 --- a/osu.Game/GameModes/Menu/MainMenu.cs +++ b/osu.Game/GameModes/Menu/MainMenu.cs @@ -25,6 +25,8 @@ namespace osu.Game.GameModes.Menu private ButtonSystem buttons; public override string Name => @"Main Menu"; + internal override bool ShowToolbar => true; + private BackgroundMode background; protected override BackgroundMode CreateBackground() => background; diff --git a/osu.Game/GameModes/OsuGameMode.cs b/osu.Game/GameModes/OsuGameMode.cs index d8b73f5f07..3ba60f53f6 100644 --- a/osu.Game/GameModes/OsuGameMode.cs +++ b/osu.Game/GameModes/OsuGameMode.cs @@ -26,6 +26,12 @@ namespace osu.Game.GameModes /// protected virtual BackgroundMode CreateBackground() => null; + internal virtual bool ShowToolbar => true; + + protected new OsuGame Game => base.Game as OsuGame; + + protected float ToolbarPadding => ShowToolbar ? Game.Toolbar.DrawHeight : 0; + private bool boundToBeatmap; private Bindable beatmap; diff --git a/osu.Game/GameModes/Play/PlaySongSelect.cs b/osu.Game/GameModes/Play/PlaySongSelect.cs index a05e02ae3b..fd22222f48 100644 --- a/osu.Game/GameModes/Play/PlaySongSelect.cs +++ b/osu.Game/GameModes/Play/PlaySongSelect.cs @@ -133,7 +133,7 @@ namespace osu.Game.GameModes.Play playMode = osuGame.PlayMode; playMode.ValueChanged += playMode_ValueChanged; // Temporary: - scrollContainer.Padding = new MarginPadding { Top = osuGame.Toolbar.Height }; + scrollContainer.Padding = new MarginPadding { Top = ToolbarPadding }; } if (database == null) diff --git a/osu.Game/GameModes/Play/Player.cs b/osu.Game/GameModes/Play/Player.cs index d48e252fa5..fecb076e63 100644 --- a/osu.Game/GameModes/Play/Player.cs +++ b/osu.Game/GameModes/Play/Player.cs @@ -22,6 +22,8 @@ namespace osu.Game.GameModes.Play protected override BackgroundMode CreateBackground() => new BackgroundModeCustom(@"Backgrounds/bg4"); + internal override bool ShowToolbar => false; + public BeatmapInfo BeatmapInfo; public PlayMode PreferredPlayMode; diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index 8a72cef0c4..1559d339fe 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -155,10 +155,10 @@ namespace osu.Game // - Frame limiter changes //central game mode change logic. - if (newMode is Player || newMode is Intro) + if ((newMode as OsuGameMode)?.ShowToolbar != true) { Toolbar.State = Visibility.Hidden; - Chat.State = Visibility.Hidden; + chat.State = Visibility.Hidden; } else {