optional "play sound effects"
optional "timeout for player action"
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>314</width>
|
||||
<height>243</height>
|
||||
<width>335</width>
|
||||
<height>274</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
@@ -44,51 +44,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2" colspan="2" >
|
||||
<widget class="QSpinBox" name="spinBox_handsBeforeRaiseSmallBlind" >
|
||||
<property name="minimum" >
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2" >
|
||||
<widget class="QLabel" name="label_4" >
|
||||
<property name="text" >
|
||||
<string>Hands before raise small blind:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="label_2" >
|
||||
<property name="text" >
|
||||
<string>Start Cash:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="label_3" >
|
||||
<property name="text" >
|
||||
<string>Small Blind:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label" >
|
||||
<property name="text" >
|
||||
<string>Number of players:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="3" >
|
||||
<widget class="QLabel" name="label_5" >
|
||||
<property name="text" >
|
||||
<string>Game Speed for computer opponent:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="3" >
|
||||
<widget class="QSpinBox" name="spinBox_smallBlind" >
|
||||
<property name="maximum" >
|
||||
@@ -102,6 +57,27 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="label_3" >
|
||||
<property name="text" >
|
||||
<string>Small Blind:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="label_2" >
|
||||
<property name="text" >
|
||||
<string>Start Cash:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label" >
|
||||
<property name="text" >
|
||||
<string>Number of players:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="3" >
|
||||
<widget class="QSpinBox" name="spinBox_startCash" >
|
||||
<property name="maximum" >
|
||||
@@ -128,6 +104,50 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2" colspan="2" >
|
||||
<widget class="QSpinBox" name="spinBox_netTimeOutPlayerAction" >
|
||||
<property name="maximum" >
|
||||
<number>60</number>
|
||||
</property>
|
||||
<property name="minimum" >
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<number>20</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2" >
|
||||
<widget class="QLabel" name="label_6" >
|
||||
<property name="text" >
|
||||
<string>Timeout for player action (sec):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2" >
|
||||
<widget class="QLabel" name="label_4" >
|
||||
<property name="text" >
|
||||
<string>Hands before raise small blind:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2" colspan="2" >
|
||||
<widget class="QSpinBox" name="spinBox_handsBeforeRaiseSmallBlind" >
|
||||
<property name="minimum" >
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="3" >
|
||||
<widget class="QLabel" name="label_5" >
|
||||
<property name="text" >
|
||||
<string>Game Speed for computer opponent:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -58,6 +58,7 @@ void createNetworkGameDialogImpl::fillFormular() {
|
||||
spinBox_smallBlind->setValue(myConfig->readConfigInt("NetSmallBlind"));
|
||||
spinBox_handsBeforeRaiseSmallBlind->setValue(myConfig->readConfigInt("NetHandsBeforeRaiseSmallBlind"));
|
||||
spinBox_gameSpeed->setValue(myConfig->readConfigInt("NetGameSpeed"));
|
||||
spinBox_netTimeOutPlayerAction->setValue(myConfig->readConfigInt("NetTimeOutPlayerAction"));
|
||||
}
|
||||
|
||||
void createNetworkGameDialogImpl::showDialog() {
|
||||
|
||||
@@ -2513,7 +2513,7 @@ void mainWindowImpl::keyPressEvent ( QKeyEvent * event ) {
|
||||
if (event->key() == Qt::Key_F3) { pushButton_BetRaise->click(); }
|
||||
if (event->key() == Qt::Key_F10) { switchLeftToolBox(); }
|
||||
if (event->key() == Qt::Key_F11) { switchRightToolBox(); }
|
||||
if (event->key() == Qt::Key_D) { setLabelArray[0]->startTimeOutAnimation(10); } //f
|
||||
if (event->key() == Qt::Key_D) { setLabelArray[0]->startTimeOutAnimation(myConfig->readConfigInt("NetTimeOutPlayerAction")); } //f
|
||||
if (event->key() == Qt::Key_E) { setLabelArray[0]->stopTimeOutAnimation(); } //f
|
||||
if (event->key() == Qt::Key_S) { playSound(); } //s
|
||||
if (event->key() == 16777249) {
|
||||
@@ -2616,21 +2616,22 @@ void mainWindowImpl::musicDone() {
|
||||
|
||||
void mainWindowImpl::playSound() {
|
||||
|
||||
cout << "play now" << endl;
|
||||
/* Actually loads up the music */
|
||||
music = Mix_LoadMUS("beep.ogg");
|
||||
|
||||
/* This begins playing the music - the first argument is a
|
||||
pointer to Mix_Music structure, and the second is how many
|
||||
times you want it to loop (use -1 for infinite, and 0 to
|
||||
have it just play once) */
|
||||
Mix_PlayMusic(music, 0);
|
||||
|
||||
if(myConfig->readConfigInt("PlaySoundEffects")) {
|
||||
cout << "play now" << endl;
|
||||
/* Actually loads up the music */
|
||||
music = Mix_LoadMUS("beep.ogg");
|
||||
|
||||
/* This begins playing the music - the first argument is a
|
||||
pointer to Mix_Music structure, and the second is how many
|
||||
times you want it to loop (use -1 for infinite, and 0 to
|
||||
have it just play once) */
|
||||
Mix_PlayMusic(music, 0);
|
||||
}
|
||||
/* We want to know when our music has stopped playing so we
|
||||
can free it up and set 'music' back to NULL. SDL_Mixer
|
||||
provides us with a callback routine we can use to do
|
||||
exactly that */
|
||||
// Mix_HookMusicFinished(musicDone);
|
||||
// Mix_HookMusicFinished(mainWindowImpl::musicDone());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -255,7 +255,7 @@ public slots:
|
||||
|
||||
//SOUND TESTING
|
||||
void playSound();
|
||||
void musicDone();
|
||||
void musicDone();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
+114
-87
@@ -6,7 +6,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>635</width>
|
||||
<height>439</height>
|
||||
<height>470</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
@@ -32,7 +32,7 @@
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="9" column="0" >
|
||||
<item row="10" column="0" >
|
||||
<widget class="QGroupBox" name="groupBox" >
|
||||
<property name="title" >
|
||||
<string>Flipside of Cards</string>
|
||||
@@ -126,10 +126,24 @@ p, li { white-space: pre-wrap; }
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QCheckBox" name="checkBox_showLeftToolbox" >
|
||||
<item row="7" column="0" >
|
||||
<widget class="QCheckBox" name="checkBox_showFlipCardsAnimation" >
|
||||
<property name="text" >
|
||||
<string>Show left toolbox (F10 to switch on/off)</string>
|
||||
<string>Show flip-card animation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" >
|
||||
<widget class="QCheckBox" name="checkBox_showBlindButtons" >
|
||||
<property name="text" >
|
||||
<string>Show buttons for small blind and big blind</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" >
|
||||
<widget class="QCheckBox" name="checkBox_showFadeOutCardsAnimation" >
|
||||
<property name="text" >
|
||||
<string>Show fade-out animation for non-winning cards</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -140,23 +154,10 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="6" column="0" >
|
||||
<widget class="QCheckBox" name="checkBox_showFadeOutCardsAnimation" >
|
||||
<item row="3" column="0" >
|
||||
<widget class="QCheckBox" name="checkBox_showLeftToolbox" >
|
||||
<property name="text" >
|
||||
<string>Show fade-out animation for non-winning cards</string>
|
||||
<string>Show left toolbox (F10 to switch on/off)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -180,13 +181,6 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" >
|
||||
<widget class="QCheckBox" name="checkBox_showFlipCardsAnimation" >
|
||||
<property name="text" >
|
||||
<string>Show flip-card animation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QCheckBox" name="checkBox_showIntro" >
|
||||
<property name="text" >
|
||||
@@ -201,10 +195,23 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" >
|
||||
<widget class="QCheckBox" name="checkBox_showBlindButtons" >
|
||||
<item row="11" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="9" column="0" >
|
||||
<widget class="QCheckBox" name="checkBox_playSoundEffects" >
|
||||
<property name="text" >
|
||||
<string>Show buttons for small blind and big blind</string>
|
||||
<string>Play sound effects</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -471,57 +478,6 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="4" column="0" >
|
||||
<widget class="QLabel" name="label_36" >
|
||||
<property name="text" >
|
||||
<string>Game Speed for computer opponents:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="label_13" >
|
||||
<property name="text" >
|
||||
<string>Start Cash:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QSpinBox" name="spinBox_netQuantityPlayers" >
|
||||
<property name="maximum" >
|
||||
<number>7</number>
|
||||
</property>
|
||||
<property name="minimum" >
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<number>7</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QSpinBox" name="spinBox_netSmallBlind" >
|
||||
<property name="maximum" >
|
||||
<number>500</number>
|
||||
</property>
|
||||
<property name="minimum" >
|
||||
<number>5</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label_15" >
|
||||
<property name="text" >
|
||||
<string>Number of players:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="label_35" >
|
||||
<property name="text" >
|
||||
<string>Small Blind:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" >
|
||||
<widget class="QSpinBox" name="spinBox_netHandsBeforeRaiseSmallBlind" >
|
||||
<property name="minimum" >
|
||||
@@ -542,10 +498,16 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QLabel" name="label_33" >
|
||||
<property name="text" >
|
||||
<string>Hands before raise small blind:</string>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QSpinBox" name="spinBox_netQuantityPlayers" >
|
||||
<property name="maximum" >
|
||||
<number>7</number>
|
||||
</property>
|
||||
<property name="minimum" >
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<number>7</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -562,11 +524,32 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="label_35" >
|
||||
<property name="text" >
|
||||
<string>Small Blind:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" >
|
||||
<widget class="QLabel" name="label_36" >
|
||||
<property name="text" >
|
||||
<string>Game Speed for computer opponents:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label_15" >
|
||||
<property name="text" >
|
||||
<string>Number of players:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1" >
|
||||
<widget class="QComboBox" name="comboBox_netEngineVersion" >
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>0.4 (actual - under development)</string>
|
||||
<string>0.4 (actual)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
@@ -583,6 +566,50 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="label_13" >
|
||||
<property name="text" >
|
||||
<string>Start Cash:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QSpinBox" name="spinBox_netSmallBlind" >
|
||||
<property name="maximum" >
|
||||
<number>500</number>
|
||||
</property>
|
||||
<property name="minimum" >
|
||||
<number>5</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QLabel" name="label_33" >
|
||||
<property name="text" >
|
||||
<string>Hands before raise small blind:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" >
|
||||
<widget class="QLabel" name="label_40" >
|
||||
<property name="text" >
|
||||
<string>Timout for player action (sec):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1" >
|
||||
<widget class="QSpinBox" name="spinBox_netTimeOutPlayerAction" >
|
||||
<property name="maximum" >
|
||||
<number>60</number>
|
||||
</property>
|
||||
<property name="minimum" >
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<number>20</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
|
||||
@@ -95,9 +95,11 @@ void settingsDialogImpl::exec() {
|
||||
spinBox_netHandsBeforeRaiseSmallBlind->setValue(myConfig->readConfigInt("NetHandsBeforeRaiseSmallBlind"));
|
||||
spinBox_netGameSpeed->setValue(myConfig->readConfigInt("NetGameSpeed"));
|
||||
comboBox_netEngineVersion->setCurrentIndex(myConfig->readConfigInt("NetEngineVersion"));
|
||||
spinBox_netTimeOutPlayerAction->setValue(myConfig->readConfigInt("NetTimeOutPlayerAction"));
|
||||
spinBox_serverPort->setValue(myConfig->readConfigInt("ServerPort"));
|
||||
lineEdit_serverPassword->setText(QString::fromUtf8(myConfig->readConfigString("ServerPassword").c_str()));
|
||||
checkBox_useIpv6->setChecked(myConfig->readConfigInt("ServerUseIpv6"));
|
||||
|
||||
|
||||
|
||||
//Interface
|
||||
@@ -108,6 +110,7 @@ void settingsDialogImpl::exec() {
|
||||
checkBox_showFadeOutCardsAnimation->setChecked(myConfig->readConfigInt("ShowFadeOutCardsAnimation"));
|
||||
checkBox_showFlipCardsAnimation->setChecked(myConfig->readConfigInt("ShowFlipCardsAnimation"));
|
||||
checkBox_showBlindButtons->setChecked(myConfig->readConfigInt("ShowBlindButtons"));
|
||||
checkBox_playSoundEffects->setChecked(myConfig->readConfigInt("PlaySoundEffects"));
|
||||
radioButton_flipsideTux->setChecked(myConfig->readConfigInt("FlipsideTux"));
|
||||
radioButton_flipsideOwn->setChecked(myConfig->readConfigInt("FlipsideOwn"));
|
||||
if(radioButton_flipsideOwn->isChecked()) {
|
||||
@@ -121,6 +124,7 @@ void settingsDialogImpl::exec() {
|
||||
lineEdit_logDir->setText(QString::fromUtf8(myConfig->readConfigString("LogDir").c_str()));
|
||||
spinBox_logStoreDuration->setValue(myConfig->readConfigInt("LogStoreDuration"));
|
||||
comboBox_logInterval->setCurrentIndex(myConfig->readConfigInt("LogInterval"));
|
||||
|
||||
|
||||
QDialog::exec();
|
||||
|
||||
@@ -225,6 +229,7 @@ void settingsDialogImpl::isAccepted() {
|
||||
myConfig->writeConfigInt("NetHandsBeforeRaiseSmallBlind", spinBox_netHandsBeforeRaiseSmallBlind->value());
|
||||
myConfig->writeConfigInt("NetGameSpeed", spinBox_netGameSpeed->value());
|
||||
myConfig->writeConfigInt("NetEngineVersion", comboBox_netEngineVersion->currentIndex());
|
||||
myConfig->writeConfigInt("NetTimeOutPlayerAction", spinBox_netTimeOutPlayerAction->value());
|
||||
myConfig->writeConfigInt("ServerPort", spinBox_serverPort->value());
|
||||
myConfig->writeConfigString("ServerPassword", lineEdit_serverPassword->text().toUtf8().constData());
|
||||
myConfig->writeConfigInt("ServerUseIpv6", checkBox_useIpv6->isChecked());
|
||||
@@ -237,6 +242,7 @@ void settingsDialogImpl::isAccepted() {
|
||||
myConfig->writeConfigInt("ShowFadeOutCardsAnimation", checkBox_showFadeOutCardsAnimation->isChecked());
|
||||
myConfig->writeConfigInt("ShowFlipCardsAnimation", checkBox_showFlipCardsAnimation->isChecked());
|
||||
myConfig->writeConfigInt("ShowBlindButtons", checkBox_showBlindButtons->isChecked());
|
||||
myConfig->writeConfigInt("PlaySoundEffects", checkBox_playSoundEffects->isChecked());
|
||||
myConfig->writeConfigInt("FlipsideTux", radioButton_flipsideTux->isChecked());
|
||||
myConfig->writeConfigInt("FlipsideOwn", radioButton_flipsideOwn->isChecked());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user