optional blind buttons
This commit is contained in:
@@ -39,7 +39,7 @@ ConfigFile::ConfigFile(int argc, char **argv) : noWriteAccess(0)
|
||||
if(strcmp(argv[i], "--nowriteaccess") == 0) { noWriteAccess = 1; }
|
||||
}
|
||||
// !!!! Revisionsnummer der Configdefaults !!!!!
|
||||
configRev = 20;
|
||||
configRev = 21;
|
||||
|
||||
//standard defaults
|
||||
logOnOffDefault = "1";
|
||||
@@ -131,6 +131,7 @@ ConfigFile::ConfigFile(int argc, char **argv) : noWriteAccess(0)
|
||||
configList.push_back(ConfigInfo("ShowIntro", CONFIG_TYPE_INT, "1"));
|
||||
configList.push_back(ConfigInfo("ShowFadeOutCardsAnimation", CONFIG_TYPE_INT, "1"));
|
||||
configList.push_back(ConfigInfo("ShowFlipCardsAnimation", CONFIG_TYPE_INT, "1"));
|
||||
configList.push_back(ConfigInfo("ShowBlindButtons", CONFIG_TYPE_INT, "1"));
|
||||
configList.push_back(ConfigInfo("FlipsideTux", CONFIG_TYPE_INT, "1"));
|
||||
configList.push_back(ConfigInfo("FlipsideOwn", CONFIG_TYPE_INT, "0"));
|
||||
configList.push_back(ConfigInfo("FlipsideOwnFile", CONFIG_TYPE_STRING, ""));
|
||||
|
||||
@@ -759,6 +759,10 @@ void mainWindowImpl::callSettingsDialog() {
|
||||
}
|
||||
else { flipside->load(":/cards/resources/graphics/cards/flipside.png"); }
|
||||
|
||||
if(mySession->getCurrentGame()) {
|
||||
//blind buttons refresh
|
||||
refreshButton();
|
||||
}
|
||||
int i,j;
|
||||
|
||||
for (i=1; i<MAX_NUMBER_OF_PLAYERS; i++ ) {
|
||||
@@ -824,6 +828,8 @@ void mainWindowImpl::refreshSet() {
|
||||
void mainWindowImpl::refreshButton() {
|
||||
|
||||
QPixmap dealerButton(":/guiv2/resources/guiv2/dealerPuck.png");
|
||||
QPixmap smallblindButton(":/graphics/resources/graphics/smallblindPuck.png");
|
||||
QPixmap bigblindButton(":/graphics/resources/graphics/bigblindPuck.png");
|
||||
QPixmap onePix(":/graphics/resources/graphics/1px.png");
|
||||
|
||||
int i;
|
||||
@@ -839,11 +845,22 @@ void mainWindowImpl::refreshButton() {
|
||||
for (i=0; i<MAX_NUMBER_OF_PLAYERS; i++) {
|
||||
if(currentHand->getPlayerArray()[i]->getMyActiveStatus()) {
|
||||
if(activePlayersCounter > 2) {
|
||||
if (currentHand->getPlayerArray()[i]->getMyButton()==1) {
|
||||
buttonLabelArray[i]->setPixmap(dealerButton);
|
||||
}
|
||||
else {
|
||||
buttonLabelArray[i]->setPixmap(onePix);
|
||||
switch (currentHand->getPlayerArray()[i]->getMyButton()) {
|
||||
|
||||
case 1 : buttonLabelArray[i]->setPixmap(dealerButton);
|
||||
break;
|
||||
case 2 : {
|
||||
if ( myConfig->readConfigInt("ShowBlindButtons")) buttonLabelArray[i]->setPixmap(smallblindButton);
|
||||
else { buttonLabelArray[i]->setPixmap(onePix); }
|
||||
}
|
||||
break;
|
||||
case 3 : {
|
||||
if (myConfig->readConfigInt("ShowBlindButtons")) buttonLabelArray[i]->setPixmap(bigblindButton);
|
||||
else { buttonLabelArray[i]->setPixmap(onePix); }
|
||||
}
|
||||
break;
|
||||
default: buttonLabelArray[i]->setPixmap(onePix);
|
||||
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -86,6 +86,8 @@
|
||||
<file>resources/graphics/toolboxFrameBG.png</file>
|
||||
<file>resources/graphics/logoChip3D.png</file>
|
||||
<file>resources/graphics/windowicon.png</file>
|
||||
<file>resources/graphics/smallblindPuck.png</file>
|
||||
<file>resources/graphics/bigblindPuck.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/guiv2" >
|
||||
<file>resources/guiv2/cardholder_03.png</file>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
@@ -32,40 +32,7 @@
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label_19" >
|
||||
<property name="font" >
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Interface</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" 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="7" column="0" >
|
||||
<widget class="QCheckBox" name="checkBox_showFlipCardsAnimation" >
|
||||
<property name="text" >
|
||||
<string>Show flip-card animation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" >
|
||||
<widget class="QGroupBox" name="groupBox" >
|
||||
<property name="title" >
|
||||
<string>Flipside of Cards</string>
|
||||
@@ -159,34 +126,6 @@ p, li { white-space: pre-wrap; }
|
||||
</layout>
|
||||
</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>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QCheckBox" name="checkBox_showIntro" >
|
||||
<property name="text" >
|
||||
<string>Show intro on startup</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="Line" name="line_6" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" >
|
||||
<widget class="QCheckBox" name="checkBox_showRightToolbox" >
|
||||
<property name="text" >
|
||||
<string>Show right toolbox (F11 to switch on/off)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QCheckBox" name="checkBox_showLeftToolbox" >
|
||||
<property name="text" >
|
||||
@@ -201,6 +140,74 @@ 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" >
|
||||
<property name="text" >
|
||||
<string>Show fade-out animation for non-winning cards</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="Line" name="line_6" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label_19" >
|
||||
<property name="font" >
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Interface</string>
|
||||
</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" >
|
||||
<string>Show intro on startup</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" >
|
||||
<widget class="QCheckBox" name="checkBox_showRightToolbox" >
|
||||
<property name="text" >
|
||||
<string>Show right toolbox (F11 to switch on/off)</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>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page_2" >
|
||||
|
||||
@@ -104,6 +104,7 @@ void settingsDialogImpl::exec() {
|
||||
checkBox_showIntro->setChecked(myConfig->readConfigInt("ShowIntro"));
|
||||
checkBox_showFadeOutCardsAnimation->setChecked(myConfig->readConfigInt("ShowFadeOutCardsAnimation"));
|
||||
checkBox_showFlipCardsAnimation->setChecked(myConfig->readConfigInt("ShowFlipCardsAnimation"));
|
||||
checkBox_showBlindButtons->setChecked(myConfig->readConfigInt("ShowBlindButtons"));
|
||||
radioButton_flipsideTux->setChecked(myConfig->readConfigInt("FlipsideTux"));
|
||||
radioButton_flipsideOwn->setChecked(myConfig->readConfigInt("FlipsideOwn"));
|
||||
if(radioButton_flipsideOwn->isChecked()) {
|
||||
@@ -232,6 +233,7 @@ void settingsDialogImpl::isAccepted() {
|
||||
myConfig->writeConfigInt("ShowIntro", checkBox_showIntro->isChecked());
|
||||
myConfig->writeConfigInt("ShowFadeOutCardsAnimation", checkBox_showFadeOutCardsAnimation->isChecked());
|
||||
myConfig->writeConfigInt("ShowFlipCardsAnimation", checkBox_showFlipCardsAnimation->isChecked());
|
||||
myConfig->writeConfigInt("ShowBlindButtons", checkBox_showBlindButtons->isChecked());
|
||||
myConfig->writeConfigInt("FlipsideTux", radioButton_flipsideTux->isChecked());
|
||||
myConfig->writeConfigInt("FlipsideOwn", radioButton_flipsideOwn->isChecked());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user