1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 14:43:02 +08:00

Added bool to ensure the notification is only displayed once per game execution

This commit is contained in:
Andrey Zavadskiy 2017-04-03 12:03:21 +03:00
parent 63a1eef6e4
commit e1d3befaed

View File

@ -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."