diff --git a/src/gui/qt/gametable/gametableimpl.cpp b/src/gui/qt/gametable/gametableimpl.cpp index 04a515fd..302c139e 100755 --- a/src/gui/qt/gametable/gametableimpl.cpp +++ b/src/gui/qt/gametable/gametableimpl.cpp @@ -636,7 +636,6 @@ void gameTableImpl::applySettings(settingsDialogImpl* mySettingsDialog) { tabWidget_Right->insertTab(2, tab_Chance, QString(tr("Chance"))); } - //Add avatar (if set) myStartWindow->getSession()->addOwnAvatar(myConfig->readConfigString("MyAvatar")); @@ -679,10 +678,29 @@ void gameTableImpl::applySettings(settingsDialogImpl* mySettingsDialog) { refreshPlayerAvatar(); } - //apply card deck style - // TODO refresh all displayed cards from opponents and board myCardDeckStyle->readStyleFile(QString::fromUtf8(myConfig->readConfigString("CurrentCardDeckStyle").c_str())); + //refresh board cards if game is running + if(myStartWindow->getSession()->getCurrentGame()) { + + int tempBoardCardsArray[5]; + myStartWindow->getSession()->getCurrentGame()->getCurrentHand()->getBoard()->getMyCards(tempBoardCardsArray); + int i; + GameState currentState = myStartWindow->getSession()->getCurrentGame()->getCurrentHand()->getCurrentBeRo()->getMyBeRoID(); + if(currentState >= GAME_STATE_FLOP && currentState <= GAME_STATE_POST_RIVER) + for(i=0; i<3; i++) { + QPixmap card = QPixmap::fromImage(QImage(myCardDeckStyle->getCurrentDir()+QString::number(tempBoardCardsArray[i], 10)+".png")); + boardCardsArray[i]->setPixmap(card, FALSE); + } + if(currentState >= GAME_STATE_TURN && currentState <= GAME_STATE_POST_RIVER) { + QPixmap card = QPixmap::fromImage(QImage(myCardDeckStyle->getCurrentDir()+QString::number(tempBoardCardsArray[3], 10)+".png")); + boardCardsArray[3]->setPixmap(card, FALSE); + } + if(currentState == GAME_STATE_RIVER || currentState == GAME_STATE_POST_RIVER) { + QPixmap card = QPixmap::fromImage(QImage(myCardDeckStyle->getCurrentDir()+QString::number(tempBoardCardsArray[4], 10)+".png")); + boardCardsArray[4]->setPixmap(card, FALSE); + } + } //Flipside refresh if (myConfig->readConfigInt("FlipsideOwn") && myConfig->readConfigString("FlipsideOwnFile") != "") { @@ -694,7 +712,15 @@ void gameTableImpl::applySettings(settingsDialogImpl* mySettingsDialog) { flipside = new QPixmap(); *flipside = QPixmap::fromImage(QImage(myCardDeckStyle->getCurrentDir()+"flipside.png")); } - + int j,k; + for (j=1; jgetIsFlipside()) { + holeCardsArray[j][k]->setPixmap(*flipside, TRUE); + } + } + } + //Check for anti-peek mode if(myStartWindow->getSession()->getCurrentGame()) { QPixmap tempCardsPixmapArray[2]; @@ -721,15 +747,6 @@ void gameTableImpl::applySettings(settingsDialogImpl* mySettingsDialog) { //blind buttons refresh refreshButton(); } - int i,j; - - for (i=1; igetIsFlipside()) { - holeCardsArray[i][j]->setPixmap(*flipside, TRUE); - } - } - } // Re-init audio. mySDLPlayer->audioDone(); mySDLPlayer->initAudio();