From 9d49dd9be504ce1636db3faaa81ea8e0b534d441 Mon Sep 17 00:00:00 2001 From: doitux Date: Mon, 2 Mar 2009 22:13:20 +0000 Subject: [PATCH] implements feature request: 9. When using Cards only visible on mouse click, retain the ability to see own cards after folding --- src/gui/qt/gametable/gametableimpl.cpp | 8 ++++---- src/gui/qt/gametable/mycardspixmaplabel.cpp | 7 ++++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/gui/qt/gametable/gametableimpl.cpp b/src/gui/qt/gametable/gametableimpl.cpp index 7881dddb..81e3aa76 100755 --- a/src/gui/qt/gametable/gametableimpl.cpp +++ b/src/gui/qt/gametable/gametableimpl.cpp @@ -929,14 +929,14 @@ void gameTableImpl::refreshAction(int playerID, int playerAction) { if (playerAction == 1) { // FOLD - if (playerID == 0 && !myConfig->readConfigInt("AntiPeekMode")) { + if (playerID == 0 /*&& !myConfig->readConfigInt("AntiPeekMode")*/) { holeCardsArray[0][0]->startFadeOut(10); holeCardsArray[0][1]->startFadeOut(10); - } + }/* else { holeCardsArray[playerID][0]->setPixmap(onePix, FALSE); holeCardsArray[playerID][1]->setPixmap(onePix, FALSE); - } + }*/ } } } @@ -2906,7 +2906,7 @@ void gameTableImpl::networkGameModification() { void gameTableImpl::mouseOverFlipCards(bool front) { if(myStartWindow->getSession()->getCurrentGame()) { - if(myConfig->readConfigInt("AntiPeekMode") && myStartWindow->getSession()->getCurrentGame()->getCurrentHand()->getSeatsList()->front()->getMyActiveStatus() && myStartWindow->getSession()->getCurrentGame()->getSeatsList()->front()->getMyAction() != PLAYER_ACTION_FOLD) { + if(myConfig->readConfigInt("AntiPeekMode") && myStartWindow->getSession()->getCurrentGame()->getCurrentHand()->getSeatsList()->front()->getMyActiveStatus()/* && myStartWindow->getSession()->getCurrentGame()->getSeatsList()->front()->getMyAction() != PLAYER_ACTION_FOLD*/){ holeCardsArray[0][0]->signalFastFlipCards(front); holeCardsArray[0][1]->signalFastFlipCards(front); } diff --git a/src/gui/qt/gametable/mycardspixmaplabel.cpp b/src/gui/qt/gametable/mycardspixmaplabel.cpp index f07c93cc..0f8da12d 100755 --- a/src/gui/qt/gametable/mycardspixmaplabel.cpp +++ b/src/gui/qt/gametable/mycardspixmaplabel.cpp @@ -190,10 +190,15 @@ void MyCardsPixmapLabel::paintEvent(QPaintEvent * event) { painter3.drawPixmap(0,0, front); } - if (fastFlipCardsFront && !fadeOutAction && !flipCardsAction1 && !flipCardsAction2) { + if (fastFlipCardsFront && !flipCardsAction1 && !flipCardsAction2) { if(objectName().contains("pixmapLabel_card0")) { QPainter painter4(this); painter4.drawPixmap(0,0, myHiddenFront); + if(fadeOutAction) { + painter4.setBrush(QColor(74,131,83)); + painter4.setOpacity(0.75); + painter4.drawRect(-1,-1,81,112); + } } } }