add sound notification for highlighted chat messages

This commit is contained in:
doitux committed 2007-09-30 19:40:43 +00:00
1 parent 0d1650e9a9
commit 24f8c6bf31
3 files changed
+4 -3

No files matched your search

@@ -64,6 +64,7 @@ public slots:
void setCurrentGameName ( const QString& theValue ) { currentGameName = theValue; }
QString getCurrentGameName() const { return currentGameName; }
mainWindowImpl* getMyW() const { return myW; }
void checkPlayerQuantity();
void joinedNetworkGame(unsigned, QString, int);
@@ -88,6 +89,8 @@ public slots:
void keyPressEvent(QKeyEvent * event);
void hideShowGameDescription(bool show);
private:
mainWindowImpl* myW;
@@ -116,11 +116,9 @@ void LobbyChat::playerLeft(QString playerName)
void LobbyChat::displayMessage(QString playerName, QString message) {
QString tempMsg;
cout << message.toStdString() << endl;
cout << QString::fromUtf8(myConfig->readConfigString("MyName").c_str()).toStdString() << endl;
if(message.contains(QString::fromUtf8(myConfig->readConfigString("MyName").c_str()), Qt::CaseInsensitive)) {
tempMsg = QString("<b>"+message+"</b>");
myLobby->getMyW()->getMySDLPlayer()->playSound("lobbychatnotify",0);
}
else {
tempMsg = message;