gui cardchancemonitor
This commit is contained in:
@@ -91,7 +91,7 @@ void Tools::getRandNumber(int start, int end, int howMany, int* randArray, bool
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int* Tools::calcCardsChance(int* playerCards, int* boardCards, GameState beRoID)
|
int* Tools::calcCardsChance(GameState beRoID, int* playerCards, int* boardCards)
|
||||||
{
|
{
|
||||||
// int playerCards[2];
|
// int playerCards[2];
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
class Tools{
|
class Tools{
|
||||||
public:
|
public:
|
||||||
static void getRandNumber(int, int, int, int*, bool);
|
static void getRandNumber(int, int, int, int*, bool);
|
||||||
static int* calcCardsChance(int*,int*,GameState);
|
static int* calcCardsChance(GameState, int*, int*);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1182,6 +1182,9 @@ void gameTableImpl::dealHoleCards() {
|
|||||||
|
|
||||||
//fix press mouse button during bankrupt with anti-peek-mode
|
//fix press mouse button during bankrupt with anti-peek-mode
|
||||||
this->mouseOverFlipCards(FALSE);
|
this->mouseOverFlipCards(FALSE);
|
||||||
|
|
||||||
|
//refresh CardsChanceMonitor Tool
|
||||||
|
refreshCardsChance(GAME_STATE_PREFLOP);
|
||||||
}
|
}
|
||||||
|
|
||||||
void gameTableImpl::dealBeRoCards(int myBeRoID) {
|
void gameTableImpl::dealBeRoCards(int myBeRoID) {
|
||||||
@@ -1289,6 +1292,9 @@ void gameTableImpl::dealFlopCards6() {
|
|||||||
updateMyButtonsState(0); //mode 0 == called from dealberocards
|
updateMyButtonsState(0); //mode 0 == called from dealberocards
|
||||||
dealFlopCards6Timer->start(postDealCardsSpeed);
|
dealFlopCards6Timer->start(postDealCardsSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//refresh CardsChanceMonitor Tool
|
||||||
|
refreshCardsChance(GAME_STATE_FLOP);
|
||||||
}
|
}
|
||||||
|
|
||||||
void gameTableImpl::dealTurnCards0() { dealTurnCards0Timer->start(preDealCardsSpeed); }
|
void gameTableImpl::dealTurnCards0() { dealTurnCards0Timer->start(preDealCardsSpeed); }
|
||||||
@@ -1323,8 +1329,9 @@ void gameTableImpl::dealTurnCards2() {
|
|||||||
else {
|
else {
|
||||||
updateMyButtonsState(0); //mode 0 == called from dealberocards
|
updateMyButtonsState(0); //mode 0 == called from dealberocards
|
||||||
dealTurnCards2Timer->start(postDealCardsSpeed);
|
dealTurnCards2Timer->start(postDealCardsSpeed);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//refresh CardsChanceMonitor Tool
|
||||||
|
refreshCardsChance(GAME_STATE_TURN);
|
||||||
}
|
}
|
||||||
|
|
||||||
void gameTableImpl::dealRiverCards0() { dealRiverCards0Timer->start(preDealCardsSpeed); }
|
void gameTableImpl::dealRiverCards0() { dealRiverCards0Timer->start(preDealCardsSpeed); }
|
||||||
@@ -1361,6 +1368,8 @@ void gameTableImpl::dealRiverCards2() {
|
|||||||
updateMyButtonsState(0); //mode 0 == called from dealberocards
|
updateMyButtonsState(0); //mode 0 == called from dealberocards
|
||||||
dealRiverCards2Timer->start(postDealCardsSpeed);
|
dealRiverCards2Timer->start(postDealCardsSpeed);
|
||||||
}
|
}
|
||||||
|
//refresh CardsChanceMonitor Tool
|
||||||
|
refreshCardsChance(GAME_STATE_RIVER);
|
||||||
}
|
}
|
||||||
|
|
||||||
void gameTableImpl::provideMyActions(int mode) {
|
void gameTableImpl::provideMyActions(int mode) {
|
||||||
@@ -3136,8 +3145,16 @@ void gameTableImpl::refreshVotesMonitor()
|
|||||||
label_votesMonitor->setText(tr("Player <b>%1</b> has %2 votes against him.").arg(QString::fromUtf8(info.playerName.c_str())));
|
label_votesMonitor->setText(tr("Player <b>%1</b> has %2 votes against him.").arg(QString::fromUtf8(info.playerName.c_str())));
|
||||||
}
|
}
|
||||||
|
|
||||||
void gameTableImpl::refreshCardsChance()
|
void gameTableImpl::refreshCardsChance(GameState bero)
|
||||||
{
|
{
|
||||||
label_chance->refreshChance(Tools::calcCardsChance());
|
if(myConfig->readConfigInt("ShowCardsChanceMonitor")) {
|
||||||
|
int boardCards[5];
|
||||||
|
int holeCards[2];
|
||||||
|
|
||||||
|
(*myStartWindow->getSession()->getCurrentGame()->getSeatsList()->begin())->getMyCards(holeCards);
|
||||||
|
myStartWindow->getSession()->getCurrentGame()->getCurrentHand()->getBoard()->getMyCards(boardCards);
|
||||||
|
|
||||||
|
label_chance->refreshChance(Tools::calcCardsChance(bero, holeCards, boardCards));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ public slots:
|
|||||||
void postRiverRunAnimation5();
|
void postRiverRunAnimation5();
|
||||||
void postRiverRunAnimation6();
|
void postRiverRunAnimation6();
|
||||||
|
|
||||||
void refreshCardsChance();
|
void refreshCardsChance(GameState);
|
||||||
|
|
||||||
void blinkingStartButtonAnimationAction();
|
void blinkingStartButtonAnimationAction();
|
||||||
|
|
||||||
|
|||||||
@@ -103,20 +103,20 @@ void MyChanceLabel::paintEvent(QPaintEvent * event) {
|
|||||||
//Draw gfx
|
//Draw gfx
|
||||||
painter.setPen(QColor(0,0,0));
|
painter.setPen(QColor(0,0,0));
|
||||||
|
|
||||||
QLinearGradient linearGrad(QPointF(80,3), QPointF(180,10));
|
QLinearGradient linearGrad(QPointF(80,3), QPointF(190,10));
|
||||||
linearGrad.setColorAt(0, Qt::blue);
|
linearGrad.setColorAt(0, Qt::blue);
|
||||||
linearGrad.setColorAt(0.5, Qt::yellow);
|
linearGrad.setColorAt(0.5, Qt::yellow);
|
||||||
linearGrad.setColorAt(1, Qt::red);
|
linearGrad.setColorAt(1, Qt::red);
|
||||||
painter.setBrush(linearGrad);
|
painter.setBrush(linearGrad);
|
||||||
|
|
||||||
if(RFChance != 0) painter.drawRect(80,3,(107*RFChance)/100,7);
|
if(RFChance != 0) painter.drawRect(80,3,(117*RFChance)/100,7);
|
||||||
if(SFChance != 0) painter.drawRect(80,16,(107*SFChance)/100,7);
|
if(SFChance != 0) painter.drawRect(80,16,(117*SFChance)/100,7);
|
||||||
if(FOAKChance != 0) painter.drawRect(80,29,(107*FOAKChance)/100,7);
|
if(FOAKChance != 0) painter.drawRect(80,29,(117*FOAKChance)/100,7);
|
||||||
if(FHChance != 0) painter.drawRect(80,42,(107*FHChance)/100,7);
|
if(FHChance != 0) painter.drawRect(80,42,(117*FHChance)/100,7);
|
||||||
if(FLChance != 0) painter.drawRect(80,55,(107*FLChance)/100,7);
|
if(FLChance != 0) painter.drawRect(80,55,(117*FLChance)/100,7);
|
||||||
if(STRChance != 0) painter.drawRect(80,68,(107*STRChance)/100,7);
|
if(STRChance != 0) painter.drawRect(80,68,(117*STRChance)/100,7);
|
||||||
if(TOAKChance != 0) painter.drawRect(80,81,(107*TOAKChance)/100,7);
|
if(TOAKChance != 0) painter.drawRect(80,81,(117*TOAKChance)/100,7);
|
||||||
if(TPChance != 0) painter.drawRect(80,94,(107*TPChance)/100,7);
|
if(TPChance != 0) painter.drawRect(80,94,(117*TPChance)/100,7);
|
||||||
if(OPChance != 0) painter.drawRect(80,107,(107*OPChance)/100,7);
|
if(OPChance != 0) painter.drawRect(80,107,(117*OPChance)/100,7);
|
||||||
if(HCChance != 0) painter.drawRect(80,120,(107*HCChance)/100,7);
|
if(HCChance != 0) painter.drawRect(80,120,(117*HCChance)/100,7);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user