add sound notification for highlighted chat messages
This commit is contained in:
Binary file not shown.
@@ -64,6 +64,7 @@ public slots:
|
|||||||
void setCurrentGameName ( const QString& theValue ) { currentGameName = theValue; }
|
void setCurrentGameName ( const QString& theValue ) { currentGameName = theValue; }
|
||||||
QString getCurrentGameName() const { return currentGameName; }
|
QString getCurrentGameName() const { return currentGameName; }
|
||||||
|
|
||||||
|
mainWindowImpl* getMyW() const { return myW; }
|
||||||
void checkPlayerQuantity();
|
void checkPlayerQuantity();
|
||||||
|
|
||||||
void joinedNetworkGame(unsigned, QString, int);
|
void joinedNetworkGame(unsigned, QString, int);
|
||||||
@@ -88,6 +89,8 @@ public slots:
|
|||||||
void keyPressEvent(QKeyEvent * event);
|
void keyPressEvent(QKeyEvent * event);
|
||||||
void hideShowGameDescription(bool show);
|
void hideShowGameDescription(bool show);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
mainWindowImpl* myW;
|
mainWindowImpl* myW;
|
||||||
|
|||||||
@@ -116,11 +116,9 @@ void LobbyChat::playerLeft(QString playerName)
|
|||||||
void LobbyChat::displayMessage(QString playerName, QString message) {
|
void LobbyChat::displayMessage(QString playerName, QString message) {
|
||||||
|
|
||||||
QString tempMsg;
|
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)) {
|
if(message.contains(QString::fromUtf8(myConfig->readConfigString("MyName").c_str()), Qt::CaseInsensitive)) {
|
||||||
tempMsg = QString("<b>"+message+"</b>");
|
tempMsg = QString("<b>"+message+"</b>");
|
||||||
|
myLobby->getMyW()->getMySDLPlayer()->playSound("lobbychatnotify",0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
tempMsg = message;
|
tempMsg = message;
|
||||||
|
|||||||
Reference in New Issue
Block a user