This commit is contained in:
doitux
2007-10-03 12:30:04 +00:00
parent 81f206284d
commit 101ef7ff3f
5 changed files with 28 additions and 15 deletions
@@ -378,15 +378,14 @@ void gameLobbyDialogImpl::addConnectedPlayer(unsigned playerId, QString playerNa
item->setData(0, Qt::UserRole, playerId);
item->setData(0, Qt::DisplayRole, playerName);
/* assert(mySession);
GameInfo info = mySession->getClientGameInfo(currentGameName.toUtf8().constData());
if(treeWidget_connectedPlayers->topLevelItemCount() != info.data.maxNumberOfPlayers) {
myW->getMySDLPlayer()->playSound("playerconnected", 0);
if(this->isVisible() && inGame && && myConfig->readConfigInt("PlayNetworkGameNotification")) {
if(treeWidget_connectedPlayers->topLevelItemCount() < label_MaximumNumberOfPlayers->text().toInt()) {
myW->getMySDLPlayer()->playSound("playerconnected", 0);
}
else {
myW->getMySDLPlayer()->playSound("onlinegameready", 0);
}
}
else {
myW->getMySDLPlayer()->playSound("onlinegameready", 0);
}*/
checkPlayerQuantity();
}
+8 -1
View File
@@ -383,7 +383,14 @@ p, li { white-space: pre-wrap; }
<item row="1" column="0" >
<widget class="QCheckBox" name="checkBox_playLobbyChatNotification" >
<property name="text" >
<string>Play notifications for lobby chat</string>
<string>Play lobby chat notifications</string>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QCheckBox" name="checkBox_playNetworkGameNotification" >
<property name="text" >
<string>Play network/internet game notifications like "player joined the game"</string>
</property>
</widget>
</item>
@@ -177,6 +177,7 @@ void settingsDialogImpl::exec() {
horizontalSlider_soundVolume->setValue(myConfig->readConfigInt("SoundVolume"));
checkBox_playGameActions->setChecked(myConfig->readConfigInt("PlayGameActions"));
checkBox_playLobbyChatNotification->setChecked(myConfig->readConfigInt("PlayLobbyChatNotification"));
checkBox_playNetworkGameNotification->setChecked(myConfig->readConfigInt("PlayNetworkGameNotification"));
//Log
groupBox_logOnOff->setChecked(myConfig->readConfigInt("LogOnOff"));
@@ -305,6 +306,7 @@ void settingsDialogImpl::isAccepted() {
myConfig->writeConfigInt("SoundVolume", horizontalSlider_soundVolume->value());
myConfig->writeConfigInt("PlayGameActions", checkBox_playGameActions->isChecked());
myConfig->writeConfigInt("PlayLobbyChatNotification", checkBox_playLobbyChatNotification->isChecked());
myConfig->writeConfigInt("PlayNetworkGameNotification", checkBox_playNetworkGameNotification->isChecked());
// Log
myConfig->writeConfigInt("LogOnOff", groupBox_logOnOff->isChecked());
@@ -74,11 +74,15 @@ void startNetworkGameDialogImpl::addConnectedPlayer(unsigned playerId, QString p
item->setData(0, Qt::UserRole, playerId);
item->setData(0, Qt::DisplayRole, playerName);
if(treeWidget->topLevelItemCount() != maxPlayerNumber) {
myW->getMySDLPlayer()->playSound("playerconnected", 0);
}
else {
myW->getMySDLPlayer()->playSound("onlinegameready", 0);
GameInfo info = mySession->getClientGameInfo(0);
if(this->isVisible() && myConfig->readConfigInt("PlayNetworkGameNotification")) {
if(treeWidget->topLevelItemCount() < info.data.maxNumberOfPlayers) {
myW->getMySDLPlayer()->playSound("playerconnected", 0);
}
else {
myW->getMySDLPlayer()->playSound("onlinegameready", 0);
}
}
checkPlayerQuantity();