add visual notification on room joins
authoralfadur
Wed, 01 May 2019 21:59:41 +0300
changeset 14892 0f39f8efbd2e
parent 14891 ce98c37826a7
child 14893 18bfa0a3c117
add visual notification on room joins
QTfrontend/ui/widget/chatwidget.cpp
--- a/QTfrontend/ui/widget/chatwidget.cpp	Wed May 01 16:37:47 2019 +0300
+++ b/QTfrontend/ui/widget/chatwidget.cpp	Wed May 01 21:59:41 2019 +0300
@@ -521,10 +521,18 @@
     if (!isIgnored)
         printChatString(nick, QString("*** ") + tr("%1 has joined").arg(linkedNick(nick)), "Join", false);
 
-    if (notifyNick && notify && (m_helloSounds.size() > 0))
+    if (notifyNick && notify)
     {
-        SDLInteraction::instance().playSoundFile(
+        if (m_helloSounds.size() > 0)
+        {
+            SDLInteraction::instance().playSoundFile(
                             m_helloSounds.at(rand() % m_helloSounds.size()));
+        }        
+
+        if (!isInGame())
+        {
+            HWApplication::alert(this, 2000);
+        }
     }
 }