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;
|
||||
|
||||
// !!!! Revisionsnummer der Configdefaults !!!!!
|
||||
configRev = 96;
|
||||
configRev = 97;
|
||||
|
||||
//standard defaults
|
||||
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("PlayLobbyChatNotification", 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("StartCash", CONFIG_TYPE_INT, "5000"));
|
||||
configList.push_back(ConfigInfo("FirstSmallBlind", CONFIG_TYPE_INT, "10"));
|
||||
|
||||
@@ -790,14 +790,14 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_playLobbyChatNotification">
|
||||
<property name="text">
|
||||
<string>Play lobby chat notifications</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_playNetworkGameNotification">
|
||||
<property name="text">
|
||||
<string>Play network/internet game notifications like "player joined the game"</string>
|
||||
@@ -807,6 +807,13 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</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>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -478,6 +478,7 @@ void settingsDialogImpl::prepareDialog()
|
||||
checkBox_playGameActions->setChecked(myConfig->readConfigInt("PlayGameActions"));
|
||||
checkBox_playLobbyChatNotification->setChecked(myConfig->readConfigInt("PlayLobbyChatNotification"));
|
||||
checkBox_playNetworkGameNotification->setChecked(myConfig->readConfigInt("PlayNetworkGameNotification"));
|
||||
checkBox_playBlindRaiseSound->setChecked(myConfig->readConfigInt("PlayBlindRaiseNotification"));
|
||||
|
||||
//Log
|
||||
groupBox_logOnOff->setChecked(myConfig->readConfigInt("LogOnOff"));
|
||||
@@ -745,6 +746,7 @@ void settingsDialogImpl::isAccepted()
|
||||
myConfig->writeConfigInt("PlayGameActions", checkBox_playGameActions->isChecked());
|
||||
myConfig->writeConfigInt("PlayLobbyChatNotification", checkBox_playLobbyChatNotification->isChecked());
|
||||
myConfig->writeConfigInt("PlayNetworkGameNotification", checkBox_playNetworkGameNotification->isChecked());
|
||||
myConfig->writeConfigInt("PlayBlindRaiseNotification", checkBox_playBlindRaiseSound->isChecked());
|
||||
|
||||
// Log
|
||||
myConfig->writeConfigInt("LogOnOff", groupBox_logOnOff->isChecked());
|
||||
|
||||
@@ -27,14 +27,16 @@ void SoundEvents::blindsWereSet(int sB)
|
||||
lastSBValue = sB;
|
||||
++lastSBLevel;
|
||||
|
||||
if(lastSBLevel == 1 || lastSBLevel == 2) {
|
||||
mySDLPlayer->playSound("blinds_raises_level1", 0);
|
||||
}
|
||||
if(lastSBLevel == 3 || lastSBLevel == 4) {
|
||||
mySDLPlayer->playSound("blinds_raises_level2", 0);
|
||||
}
|
||||
if(lastSBLevel >= 5) {
|
||||
mySDLPlayer->playSound("blinds_raises_level3", 0);
|
||||
if(myConfig->readConfigInt("PlayBlindRaiseNotification")) {
|
||||
if(lastSBLevel == 1 || lastSBLevel == 2) {
|
||||
mySDLPlayer->playSound("blinds_raises_level1", 0);
|
||||
}
|
||||
if(lastSBLevel == 3 || lastSBLevel == 4) {
|
||||
mySDLPlayer->playSound("blinds_raises_level2", 0);
|
||||
}
|
||||
if(lastSBLevel >= 5) {
|
||||
mySDLPlayer->playSound("blinds_raises_level3", 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user