From e1d3befaed9292627473a55cd71c27507e77f5f5 Mon Sep 17 00:00:00 2001 From: Andrey Zavadskiy Date: Mon, 3 Apr 2017 12:03:21 +0300 Subject: [PATCH] Added bool to ensure the notification is only displayed once per game execution --- osu.Game/Modes/UI/HudOverlay.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/osu.Game/Modes/UI/HudOverlay.cs b/osu.Game/Modes/UI/HudOverlay.cs index e2e18e437e..a259f2d09f 100644 --- a/osu.Game/Modes/UI/HudOverlay.cs +++ b/osu.Game/Modes/UI/HudOverlay.cs @@ -30,6 +30,8 @@ namespace osu.Game.Modes.UI private readonly Container hud; + private static bool has_shown_notification_once = false; + protected abstract KeyCounterCollection CreateKeyCounter(); protected abstract ComboCounter CreateComboCounter(); protected abstract PercentageCounter CreateAccuracyCounter(); @@ -66,8 +68,10 @@ namespace osu.Game.Modes.UI showHud.ValueChanged += hudVisibilityChanged; showHud.TriggerChange(); - if (!showHud) + if (!showHud && !has_shown_notification_once) { + has_shown_notification_once = true; + notificationManager?.Post(new SimpleNotification { Text = @"The score overlay is currently disabled. You can toogle this by pressing Shift + Tab."