diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneSkinEditor.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneSkinEditor.cs index 91188f5bacd8..de02d13489f8 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestSceneSkinEditor.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneSkinEditor.cs @@ -37,6 +37,8 @@ public partial class TestSceneSkinEditor : PlayerTestScene protected override bool Autoplay => true; + protected override bool ShowSettingsOverlay => false; + [Cached] private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Blue); diff --git a/osu.Game/Overlays/SkinEditor/SkinEditorOverlay.cs b/osu.Game/Overlays/SkinEditor/SkinEditorOverlay.cs index 571f99bd08eb..dfc17a7f6267 100644 --- a/osu.Game/Overlays/SkinEditor/SkinEditorOverlay.cs +++ b/osu.Game/Overlays/SkinEditor/SkinEditorOverlay.cs @@ -347,6 +347,7 @@ public EndlessPlayer(Func, Score> createScore) { ShowResults = false, AutomaticallySkipIntro = true, + ShowSettingsOverlay = false, }) { } diff --git a/osu.Game/Screens/Play/HUDOverlay.cs b/osu.Game/Screens/Play/HUDOverlay.cs index fca871e42f83..4b01ae4bd3c9 100644 --- a/osu.Game/Screens/Play/HUDOverlay.cs +++ b/osu.Game/Screens/Play/HUDOverlay.cs @@ -84,6 +84,8 @@ protected override bool ShouldBeConsideredForInput(Drawable child) private readonly BindableBool replayLoaded = new BindableBool(); + private readonly bool showSettingsOverlay; + private static bool hasShownNotificationOnce; private readonly FillFlowContainer bottomRightElements; @@ -113,12 +115,13 @@ protected override bool ShouldBeConsideredForInput(Drawable child) /// internal readonly Drawable PlayfieldSkinLayer; - public HUDOverlay([CanBeNull] DrawableRuleset drawableRuleset, IReadOnlyList mods, bool alwaysShowLeaderboard = true) + public HUDOverlay([CanBeNull] DrawableRuleset drawableRuleset, IReadOnlyList mods, bool alwaysShowLeaderboard = true, bool showSettingsOverlay = true) { Container rightSettings; this.drawableRuleset = drawableRuleset; this.mods = mods; + this.showSettingsOverlay = showSettingsOverlay; RelativeSizeAxes = Axes.Both; @@ -189,6 +192,9 @@ public HUDOverlay([CanBeNull] DrawableRuleset drawableRuleset, IReadOnlyList public bool AlwaysShowLeaderboard { get; set; } + + /// + /// Whether the right overlay containing settings should be shown or not. + /// + public bool ShowSettingsOverlay { get; set; } = true; } } diff --git a/osu.Game/Tests/Visual/PlayerTestScene.cs b/osu.Game/Tests/Visual/PlayerTestScene.cs index 43d779261c4b..09e666545a40 100644 --- a/osu.Game/Tests/Visual/PlayerTestScene.cs +++ b/osu.Game/Tests/Visual/PlayerTestScene.cs @@ -86,6 +86,8 @@ protected void CreateTest([CanBeNull] Action action = null) protected virtual bool Autoplay => false; + protected virtual bool ShowSettingsOverlay => true; + protected void LoadPlayer() => LoadPlayer(Array.Empty()); protected void LoadPlayer(Mod[] mods) @@ -136,6 +138,6 @@ protected override void Dispose(bool isDisposing) protected sealed override Ruleset CreateRuleset() => CreatePlayerRuleset(); - protected virtual TestPlayer CreatePlayer(Ruleset ruleset) => new TestPlayer(false, false, AllowBackwardsSeeks); + protected virtual TestPlayer CreatePlayer(Ruleset ruleset) => new TestPlayer(false, false, AllowBackwardsSeeks, ShowSettingsOverlay); } } diff --git a/osu.Game/Tests/Visual/TestPlayer.cs b/osu.Game/Tests/Visual/TestPlayer.cs index 579a1934e020..904925d8fdd7 100644 --- a/osu.Game/Tests/Visual/TestPlayer.cs +++ b/osu.Game/Tests/Visual/TestPlayer.cs @@ -51,11 +51,12 @@ public partial class TestPlayer : SoloPlayer [Resolved] private SpectatorClient spectatorClient { get; set; } - public TestPlayer(bool allowPause = true, bool showResults = true, bool pauseOnFocusLost = false) + public TestPlayer(bool allowPause = true, bool showResults = true, bool pauseOnFocusLost = false, bool showSettingsOverlay = true) : base(new PlayerConfiguration { AllowPause = allowPause, - ShowResults = showResults + ShowResults = showResults, + ShowSettingsOverlay = showSettingsOverlay }) { PauseOnFocusLost = pauseOnFocusLost;