add delay between hands option for network/internet game
This commit is contained in:
@@ -110,56 +110,7 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="3">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Game Speed for computer opponents:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>spinBox_gameSpeed</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QSpinBox" name="spinBox_gameSpeed">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>4</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Timeout for player action:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>spinBox_netTimeOutPlayerAction</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2" colspan="2">
|
||||
<widget class="QSpinBox" name="spinBox_netTimeOutPlayerAction">
|
||||
<property name="suffix">
|
||||
<string> s</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>60</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>20</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="4">
|
||||
<item row="6" column="0" colspan="4">
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
@@ -186,6 +137,58 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Timeout for player action:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>spinBox_netTimeOutPlayerAction</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Delay between hands:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>spinBox_netDelayBetweenHands</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2" colspan="2">
|
||||
<widget class="QSpinBox" name="spinBox_netTimeOutPlayerAction">
|
||||
<property name="suffix">
|
||||
<string> s</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>60</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>20</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2" colspan="2">
|
||||
<widget class="QSpinBox" name="spinBox_netDelayBetweenHands">
|
||||
<property name="suffix">
|
||||
<string> s</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>7</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -233,8 +236,6 @@
|
||||
<tabstop>spinBox_startCash</tabstop>
|
||||
<tabstop>radioButton_useSavedBlindsSettings</tabstop>
|
||||
<tabstop>radioButton_changeBlindsSettings</tabstop>
|
||||
<tabstop>spinBox_gameSpeed</tabstop>
|
||||
<tabstop>spinBox_netTimeOutPlayerAction</tabstop>
|
||||
<tabstop>checkBox_Password</tabstop>
|
||||
<tabstop>lineEdit_Password</tabstop>
|
||||
<tabstop>pushButton_createGame</tabstop>
|
||||
|
||||
@@ -67,8 +67,7 @@ void createInternetGameDialogImpl::fillFormular() {
|
||||
//Network Game Settings
|
||||
spinBox_quantityPlayers->setValue(myConfig->readConfigInt("NetNumberOfPlayers"));
|
||||
spinBox_startCash->setValue(myConfig->readConfigInt("NetStartCash"));
|
||||
//temporarely unused until ai is enabled in network
|
||||
spinBox_gameSpeed->setValue(myConfig->readConfigInt("NetGameSpeed"));
|
||||
spinBox_netDelayBetweenHands->setValue(myConfig->readConfigInt("NetDelayBetweenHands"));
|
||||
spinBox_netTimeOutPlayerAction->setValue(myConfig->readConfigInt("NetTimeOutPlayerAction"));
|
||||
checkBox_Password->setChecked(myConfig->readConfigInt("UseInternetGamePassword"));
|
||||
if(myConfig->readConfigInt("UseInternetGamePassword")) {
|
||||
|
||||
@@ -104,30 +104,7 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="3">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Game Speed for computer opponents:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>spinBox_gameSpeed</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QSpinBox" name="spinBox_gameSpeed">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>4</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<item row="4" column="0" colspan="3">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Timeout for player action:</string>
|
||||
@@ -137,7 +114,17 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2" colspan="2">
|
||||
<item row="5" column="0" colspan="3">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Delay between hands:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>spinBox_netDelayBetweenHands</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<widget class="QSpinBox" name="spinBox_netTimeOutPlayerAction">
|
||||
<property name="suffix">
|
||||
<string> s</string>
|
||||
@@ -153,6 +140,22 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="3">
|
||||
<widget class="QSpinBox" name="spinBox_netDelayBetweenHands">
|
||||
<property name="suffix">
|
||||
<string> s</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>7</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -200,8 +203,6 @@
|
||||
<tabstop>spinBox_startCash</tabstop>
|
||||
<tabstop>radioButton_useSavedBlindsSettings</tabstop>
|
||||
<tabstop>radioButton_changeBlindsSettings</tabstop>
|
||||
<tabstop>spinBox_gameSpeed</tabstop>
|
||||
<tabstop>spinBox_netTimeOutPlayerAction</tabstop>
|
||||
<tabstop>pushButton_createGame</tabstop>
|
||||
<tabstop>pushButton_cancel</tabstop>
|
||||
</tabstops>
|
||||
|
||||
@@ -66,8 +66,7 @@ void createNetworkGameDialogImpl::fillFormular() {
|
||||
//Network Game Settings
|
||||
spinBox_quantityPlayers->setValue(myConfig->readConfigInt("NetNumberOfPlayers"));
|
||||
spinBox_startCash->setValue(myConfig->readConfigInt("NetStartCash"));
|
||||
//temporarely unused until ai is enabled in network
|
||||
spinBox_gameSpeed->setValue(myConfig->readConfigInt("NetGameSpeed"));
|
||||
spinBox_netDelayBetweenHands->setValue(myConfig->readConfigInt("NetDelayBetweenHands"));
|
||||
spinBox_netTimeOutPlayerAction->setValue(myConfig->readConfigInt("NetTimeOutPlayerAction"));
|
||||
|
||||
//fill changeCompleteBlindsDialog
|
||||
|
||||
@@ -176,7 +176,7 @@ void gameLobbyDialogImpl::createGame()
|
||||
}
|
||||
}
|
||||
|
||||
gameData.guiSpeed = myCreateInternetGameDialog->spinBox_gameSpeed->value();
|
||||
gameData.guiSpeed = myConfig->readConfigInt("GameSpeed");
|
||||
gameData.playerActionTimeoutSec = myCreateInternetGameDialog->spinBox_netTimeOutPlayerAction->value();
|
||||
|
||||
QString gameString(tr("%1's game"));
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="stackedWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>4</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page">
|
||||
<layout class="QGridLayout" name="gridLayout_8">
|
||||
@@ -1294,24 +1294,30 @@ p, li { white-space: pre-wrap; }
|
||||
<item>
|
||||
<widget class="QLabel" name="label_36">
|
||||
<property name="text">
|
||||
<string>Game Speed for computer opponents:</string>
|
||||
<string>Delay between hands:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>spinBox_netGameSpeed</cstring>
|
||||
<cstring>spinBox_netDelayBetweenHands</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBox_netGameSpeed">
|
||||
<widget class="QSpinBox" name="spinBox_netDelayBetweenHands">
|
||||
<property name="suffix">
|
||||
<string> s</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>11</number>
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>7</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@@ -3363,7 +3369,7 @@ p, li { white-space: pre-wrap; }
|
||||
<tabstop>radioButton_netAlwaysDoubleBlinds</tabstop>
|
||||
<tabstop>radioButton_netManualBlindsOrder</tabstop>
|
||||
<tabstop>pushButton_netEditManualBlindsOrder</tabstop>
|
||||
<tabstop>spinBox_netGameSpeed</tabstop>
|
||||
<tabstop>spinBox_netDelayBetweenHands</tabstop>
|
||||
<tabstop>spinBox_netTimeOutPlayerAction</tabstop>
|
||||
<tabstop>spinBox_serverPort</tabstop>
|
||||
<tabstop>lineEdit_serverPassword</tabstop>
|
||||
|
||||
@@ -180,7 +180,7 @@ void settingsDialogImpl::exec() {
|
||||
spinBox_netRaiseSmallBlindEveryMinutes->setValue(myConfig->readConfigInt("NetRaiseSmallBlindEveryMinutes"));
|
||||
radioButton_netAlwaysDoubleBlinds->setChecked(myConfig->readConfigInt("NetAlwaysDoubleBlinds"));
|
||||
radioButton_netManualBlindsOrder->setChecked(myConfig->readConfigInt("NetManualBlindsOrder"));
|
||||
spinBox_netGameSpeed->setValue(myConfig->readConfigInt("NetGameSpeed"));
|
||||
spinBox_netDelayBetweenHands->setValue(myConfig->readConfigInt("NetDelayBetweenHands"));
|
||||
spinBox_netTimeOutPlayerAction->setValue(myConfig->readConfigInt("NetTimeOutPlayerAction"));
|
||||
spinBox_serverPort->setValue(myConfig->readConfigInt("ServerPort"));
|
||||
lineEdit_serverPassword->setText(QString::fromUtf8(myConfig->readConfigString("ServerPassword").c_str()));
|
||||
@@ -483,7 +483,7 @@ void settingsDialogImpl::isAccepted() {
|
||||
myConfig->writeConfigInt("NetRaiseSmallBlindEveryMinutes", spinBox_netRaiseSmallBlindEveryMinutes->value());
|
||||
myConfig->writeConfigInt("NetAlwaysDoubleBlinds", radioButton_netAlwaysDoubleBlinds->isChecked());
|
||||
myConfig->writeConfigInt("NetManualBlindsOrder", radioButton_netManualBlindsOrder->isChecked());
|
||||
myConfig->writeConfigInt("NetGameSpeed", spinBox_netGameSpeed->value());
|
||||
myConfig->writeConfigInt("NetDelayBetweenHands", spinBox_netDelayBetweenHands->value());
|
||||
myConfig->writeConfigInt("NetTimeOutPlayerAction", spinBox_netTimeOutPlayerAction->value());
|
||||
myConfig->writeConfigInt("ServerPort", spinBox_serverPort->value());
|
||||
myConfig->writeConfigString("ServerPassword", lineEdit_serverPassword->text().toUtf8().constData());
|
||||
|
||||
@@ -390,7 +390,7 @@ void startWindowImpl::callCreateNetworkGameDialog() {
|
||||
}
|
||||
}
|
||||
|
||||
gameData.guiSpeed = myCreateNetworkGameDialog->spinBox_gameSpeed->value();
|
||||
gameData.guiSpeed = myConfig->readConfigInt("GameSpeed");
|
||||
gameData.playerActionTimeoutSec = myCreateNetworkGameDialog->spinBox_netTimeOutPlayerAction->value();
|
||||
|
||||
myGameLobbyDialog->setSession(getSession());
|
||||
|
||||
Reference in New Issue
Block a user