implementing: make raise-blind sound optional (#127)
This commit is contained in:
@@ -50,7 +50,7 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly)
|
|||||||
myConfigState = OK;
|
myConfigState = OK;
|
||||||
|
|
||||||
// !!!! Revisionsnummer der Configdefaults !!!!!
|
// !!!! Revisionsnummer der Configdefaults !!!!!
|
||||||
configRev = 96;
|
configRev = 97;
|
||||||
|
|
||||||
//standard defaults
|
//standard defaults
|
||||||
logOnOffDefault = "1";
|
logOnOffDefault = "1";
|
||||||
@@ -160,6 +160,7 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly)
|
|||||||
configList.push_back(ConfigInfo("PlayGameActions", CONFIG_TYPE_INT, "1"));
|
configList.push_back(ConfigInfo("PlayGameActions", CONFIG_TYPE_INT, "1"));
|
||||||
configList.push_back(ConfigInfo("PlayLobbyChatNotification", CONFIG_TYPE_INT, "1"));
|
configList.push_back(ConfigInfo("PlayLobbyChatNotification", CONFIG_TYPE_INT, "1"));
|
||||||
configList.push_back(ConfigInfo("PlayNetworkGameNotification", CONFIG_TYPE_INT, "1"));
|
configList.push_back(ConfigInfo("PlayNetworkGameNotification", CONFIG_TYPE_INT, "1"));
|
||||||
|
configList.push_back(ConfigInfo("PlayBlindRaiseNotification", CONFIG_TYPE_INT, "1"));
|
||||||
configList.push_back(ConfigInfo("NumberOfPlayers", CONFIG_TYPE_INT, "10"));
|
configList.push_back(ConfigInfo("NumberOfPlayers", CONFIG_TYPE_INT, "10"));
|
||||||
configList.push_back(ConfigInfo("StartCash", CONFIG_TYPE_INT, "5000"));
|
configList.push_back(ConfigInfo("StartCash", CONFIG_TYPE_INT, "5000"));
|
||||||
configList.push_back(ConfigInfo("FirstSmallBlind", CONFIG_TYPE_INT, "10"));
|
configList.push_back(ConfigInfo("FirstSmallBlind", CONFIG_TYPE_INT, "10"));
|
||||||
|
|||||||
@@ -790,14 +790,14 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QCheckBox" name="checkBox_playLobbyChatNotification">
|
<widget class="QCheckBox" name="checkBox_playLobbyChatNotification">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Play lobby chat notifications</string>
|
<string>Play lobby chat notifications</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QCheckBox" name="checkBox_playNetworkGameNotification">
|
<widget class="QCheckBox" name="checkBox_playNetworkGameNotification">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Play network/internet game notifications like "player joined the game"</string>
|
<string>Play network/internet game notifications like "player joined the game"</string>
|
||||||
@@ -807,6 +807,13 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QCheckBox" name="checkBox_playBlindRaiseSound">
|
||||||
|
<property name="text">
|
||||||
|
<string>Play blind raise notification</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@@ -478,6 +478,7 @@ void settingsDialogImpl::prepareDialog()
|
|||||||
checkBox_playGameActions->setChecked(myConfig->readConfigInt("PlayGameActions"));
|
checkBox_playGameActions->setChecked(myConfig->readConfigInt("PlayGameActions"));
|
||||||
checkBox_playLobbyChatNotification->setChecked(myConfig->readConfigInt("PlayLobbyChatNotification"));
|
checkBox_playLobbyChatNotification->setChecked(myConfig->readConfigInt("PlayLobbyChatNotification"));
|
||||||
checkBox_playNetworkGameNotification->setChecked(myConfig->readConfigInt("PlayNetworkGameNotification"));
|
checkBox_playNetworkGameNotification->setChecked(myConfig->readConfigInt("PlayNetworkGameNotification"));
|
||||||
|
checkBox_playBlindRaiseSound->setChecked(myConfig->readConfigInt("PlayBlindRaiseNotification"));
|
||||||
|
|
||||||
//Log
|
//Log
|
||||||
groupBox_logOnOff->setChecked(myConfig->readConfigInt("LogOnOff"));
|
groupBox_logOnOff->setChecked(myConfig->readConfigInt("LogOnOff"));
|
||||||
@@ -745,6 +746,7 @@ void settingsDialogImpl::isAccepted()
|
|||||||
myConfig->writeConfigInt("PlayGameActions", checkBox_playGameActions->isChecked());
|
myConfig->writeConfigInt("PlayGameActions", checkBox_playGameActions->isChecked());
|
||||||
myConfig->writeConfigInt("PlayLobbyChatNotification", checkBox_playLobbyChatNotification->isChecked());
|
myConfig->writeConfigInt("PlayLobbyChatNotification", checkBox_playLobbyChatNotification->isChecked());
|
||||||
myConfig->writeConfigInt("PlayNetworkGameNotification", checkBox_playNetworkGameNotification->isChecked());
|
myConfig->writeConfigInt("PlayNetworkGameNotification", checkBox_playNetworkGameNotification->isChecked());
|
||||||
|
myConfig->writeConfigInt("PlayBlindRaiseNotification", checkBox_playBlindRaiseSound->isChecked());
|
||||||
|
|
||||||
// Log
|
// Log
|
||||||
myConfig->writeConfigInt("LogOnOff", groupBox_logOnOff->isChecked());
|
myConfig->writeConfigInt("LogOnOff", groupBox_logOnOff->isChecked());
|
||||||
|
|||||||
@@ -27,14 +27,16 @@ void SoundEvents::blindsWereSet(int sB)
|
|||||||
lastSBValue = sB;
|
lastSBValue = sB;
|
||||||
++lastSBLevel;
|
++lastSBLevel;
|
||||||
|
|
||||||
if(lastSBLevel == 1 || lastSBLevel == 2) {
|
if(myConfig->readConfigInt("PlayBlindRaiseNotification")) {
|
||||||
mySDLPlayer->playSound("blinds_raises_level1", 0);
|
if(lastSBLevel == 1 || lastSBLevel == 2) {
|
||||||
}
|
mySDLPlayer->playSound("blinds_raises_level1", 0);
|
||||||
if(lastSBLevel == 3 || lastSBLevel == 4) {
|
}
|
||||||
mySDLPlayer->playSound("blinds_raises_level2", 0);
|
if(lastSBLevel == 3 || lastSBLevel == 4) {
|
||||||
}
|
mySDLPlayer->playSound("blinds_raises_level2", 0);
|
||||||
if(lastSBLevel >= 5) {
|
}
|
||||||
mySDLPlayer->playSound("blinds_raises_level3", 0);
|
if(lastSBLevel >= 5) {
|
||||||
|
mySDLPlayer->playSound("blinds_raises_level3", 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user