gui cardchancemonitor
This commit is contained in:
@@ -3148,6 +3148,8 @@ void gameTableImpl::refreshVotesMonitor()
|
|||||||
void gameTableImpl::refreshCardsChance(GameState bero)
|
void gameTableImpl::refreshCardsChance(GameState bero)
|
||||||
{
|
{
|
||||||
if(myConfig->readConfigInt("ShowCardsChanceMonitor")) {
|
if(myConfig->readConfigInt("ShowCardsChanceMonitor")) {
|
||||||
|
|
||||||
|
if((*myStartWindow->getSession()->getCurrentGame()->getSeatsList()->begin())->getMyActiveStatus() && (*myStartWindow->getSession()->getCurrentGame()->getSeatsList()->begin())->getMyAction() != PLAYER_ACTION_FOLD) {
|
||||||
int boardCards[5];
|
int boardCards[5];
|
||||||
int holeCards[2];
|
int holeCards[2];
|
||||||
|
|
||||||
@@ -3156,5 +3158,9 @@ void gameTableImpl::refreshCardsChance(GameState bero)
|
|||||||
|
|
||||||
label_chance->refreshChance(Tools::calcCardsChance(bero, holeCards, boardCards));
|
label_chance->refreshChance(Tools::calcCardsChance(bero, holeCards, boardCards));
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
label_chance->resetChance();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -120,3 +120,20 @@ void MyChanceLabel::paintEvent(QPaintEvent * event) {
|
|||||||
if(OPChance != 0) painter.drawRect(80,107,(117*OPChance)/100,7);
|
if(OPChance != 0) painter.drawRect(80,107,(117*OPChance)/100,7);
|
||||||
if(HCChance != 0) painter.drawRect(80,120,(117*HCChance)/100,7);
|
if(HCChance != 0) painter.drawRect(80,120,(117*HCChance)/100,7);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MyChanceLabel::resetChance()
|
||||||
|
{
|
||||||
|
RFChance = 0;
|
||||||
|
SFChance = 0;
|
||||||
|
FOAKChance = 0;
|
||||||
|
FHChance = 0;
|
||||||
|
FLChance = 0;
|
||||||
|
STRChance = 0;
|
||||||
|
TOAKChance = 0;
|
||||||
|
TPChance = 0;
|
||||||
|
OPChance = 0;
|
||||||
|
HCChance = 0;
|
||||||
|
|
||||||
|
update();
|
||||||
|
}
|
||||||
@@ -30,6 +30,7 @@ public:
|
|||||||
void setMyW ( gameTableImpl* theValue ) { myW = theValue; }
|
void setMyW ( gameTableImpl* theValue ) { myW = theValue; }
|
||||||
void paintEvent(QPaintEvent * event);
|
void paintEvent(QPaintEvent * event);
|
||||||
void refreshChance(int*);
|
void refreshChance(int*);
|
||||||
|
void resetChance();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user