diff --git a/src/engine/local_engine/localplayer.cpp b/src/engine/local_engine/localplayer.cpp index cec4b8a6..af738dbe 100755 --- a/src/engine/local_engine/localplayer.cpp +++ b/src/engine/local_engine/localplayer.cpp @@ -114,7 +114,7 @@ void LocalPlayer::action() { default: {} } - + cout << myID << ": " << myAction << endl; myTurn = 0; // cout << "jetzt" << endl; @@ -215,7 +215,7 @@ void LocalPlayer::preflopEngine() { } } - evaluation(myAction, bet, raise); + evaluation(bet, raise); } @@ -331,7 +331,7 @@ void LocalPlayer::flopEngine() { cout << myID << ": Dude " << myDude4 << "\t Wert " << myOdds << "\t Niveau " << myNiveau[0] << " " << myNiveau[1] << " " << myNiveau[2] << endl; - evaluation(myAction, bet, raise); + evaluation(bet, raise); @@ -775,7 +775,7 @@ void LocalPlayer::turnEngine() { } - evaluation(myAction, bet, raise); + evaluation(bet, raise); } @@ -970,7 +970,7 @@ void LocalPlayer::riverEngine() { } - evaluation(myAction, bet, raise); + evaluation(bet, raise); @@ -979,7 +979,7 @@ void LocalPlayer::riverEngine() { -void LocalPlayer::evaluation(int myAction, int bet, int raise) { +void LocalPlayer::evaluation(int bet, int raise) { int highestSet = 0; @@ -995,6 +995,8 @@ void LocalPlayer::evaluation(int myAction, int bet, int raise) { default: cout << "ERROR - wrong init of actualRound" << endl; } + cout << "evaluation: " << myAction << " highestSet " << highestSet << " myCash " << myCash << endl; + switch(myAction) { // none case 0: {} @@ -1012,6 +1014,7 @@ void LocalPlayer::evaluation(int myAction, int bet, int raise) { mySet += myCash; myCash = 0; myAction = 6; + cout << "dfgsdfg" << endl; } // sonst else { @@ -1072,6 +1075,7 @@ void LocalPlayer::evaluation(int myAction, int bet, int raise) { default: cout << "ERROR - wrong init of actualRound" << endl; } + } diff --git a/src/engine/local_engine/localplayer.h b/src/engine/local_engine/localplayer.h index 7d79bab4..c818d7bf 100755 --- a/src/engine/local_engine/localplayer.h +++ b/src/engine/local_engine/localplayer.h @@ -120,7 +120,7 @@ public: void readFile(); - void evaluation(int, int, int); + void evaluation(int, int); private: diff --git a/src/gui/qt/mainwindow.ui b/src/gui/qt/mainwindow.ui index b5ed2309..93e25024 100644 --- a/src/gui/qt/mainwindow.ui +++ b/src/gui/qt/mainwindow.ui @@ -774,10 +774,10 @@ - 24 - 29 - 72 - 53 + 9 + 35 + 100 + 40 @@ -839,38 +839,6 @@ - - - - 85 - 40 - 118 - 111 - - - - - - 24 - 29 - 72 - 53 - - - - - 0 - 20 - - - - - - - Qt::AlignCenter - - - @@ -1083,6 +1051,38 @@ + + + + 85 + 40 + 118 + 111 + + + + + + 9 + 35 + 100 + 40 + + + + + 0 + 20 + + + + + + + Qt::AlignCenter + + + @@ -1127,10 +1127,10 @@ - 24 - 29 - 72 - 53 + 9 + 35 + 100 + 40 @@ -1403,10 +1403,10 @@ - 24 - 29 - 72 - 53 + 9 + 35 + 100 + 40 @@ -1727,10 +1727,16 @@ 16777215 + + QTabWidget { background-image: url(:/graphics/resources/graphics/1px.png) } + 0 + + QWidget { background-image: url(:/graphics/resources/graphics/1px.png) } + Hands @@ -2115,28 +2121,6 @@ Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - 320 - 110 - 72 - 53 - - - - - 0 - 20 - - - - - - - Qt::AlignCenter - - @@ -2146,6 +2130,28 @@ 111 + + + + 9 + 35 + 100 + 40 + + + + + 0 + 20 + + + + + + + Qt::AlignCenter + + @@ -2701,6 +2707,19 @@ Qt::AlignBottom|Qt::AlignHCenter + + + + 17 + 17 + 50 + 50 + + + + + + @@ -2713,10 +2732,10 @@ - 24 - 29 - 72 - 53 + 9 + 35 + 100 + 40 @@ -2733,19 +2752,6 @@ - - - - 17 - 17 - 50 - 50 - - - - - - @@ -3602,38 +3608,6 @@ - - - - 85 - 40 - 118 - 111 - - - - - - 20 - 80 - 72 - 53 - - - - - 0 - 20 - - - - - - - Qt::AlignCenter - - - @@ -3846,6 +3820,38 @@ + + + + 85 + 40 + 118 + 111 + + + + + + 9 + 35 + 100 + 40 + + + + + 0 + 20 + + + + + + + Qt::AlignCenter + + + diff --git a/src/gui/qt/mainwindow/mainwindowimpl.cpp b/src/gui/qt/mainwindow/mainwindowimpl.cpp index dbde8f64..d81297f2 100755 --- a/src/gui/qt/mainwindow/mainwindowimpl.cpp +++ b/src/gui/qt/mainwindow/mainwindowimpl.cpp @@ -54,7 +54,7 @@ const int maxQuantityPlayersConst = 7; using namespace std; mainWindowImpl::mainWindowImpl(QMainWindow *parent) - : QMainWindow(parent), actualGame(0), actualHand(0), mySession(0), maxQuantityPlayers(maxQuantityPlayersConst), gameSpeed(0), debugMode(1), breakAfterActualHand(FALSE) + : QMainWindow(parent), actualGame(0), actualHand(0), mySession(0), maxQuantityPlayers(maxQuantityPlayersConst), gameSpeed(0), debugMode(0), breakAfterActualHand(FALSE) { int i; @@ -441,7 +441,7 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent) cashLabelArray[i]->setFont(tmpFont2); } - tmpFont2.setPixelSize(11); + tmpFont2.setPixelSize(12); for (i=0; isetFont(tmpFont2); @@ -476,11 +476,8 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent) } -// for (i=0; isetStyleSheet("QGroupBox { border:none }"); -// -// } + //raise actionLable above just inserted mypixmaplabel + for (i=0; iraise(); } //ShortCuts @@ -832,35 +829,33 @@ void mainWindowImpl::refreshPlayerAvatar() { void mainWindowImpl::refreshAction() { + QPixmap onePix(":/graphics/resources/graphics/1px.png"); + QPixmap action; + QStringList actionArray; - actionArray << "" << "Fold" << "Check" << "Call" << "Bet" << "Raise" << "All-In"; + actionArray << "" << "fold" << "check" << "call" << "bet" << "raise" << "allin"; int i; for (i=0; isetText("

"+actionArray[actualHand->getPlayerArray()[i]->getMyAction()]+"

"); + //if no action --> clear Pixmap + if(actualHand->getPlayerArray()[i]->getMyAction() == 0) { + actionLabelArray[i]->setPixmap(onePix); + } + else { + //paint action pixmap and raise + actionLabelArray[i]->setPixmap(QPixmap(":/actions/resources/graphics/actions/action_"+actionArray[actualHand->getPlayerArray()[i]->getMyAction()]+".png")); + } + if (actualHand->getPlayerArray()[i]->getMyAction()==1) { // groupBoxArray[i]->setDisabled(TRUE); - QPixmap onePix(":/graphics/resources/graphics/1px.png"); + if(i != 0) { holeCardsArray[i][0]->setPixmap(onePix, FALSE); holeCardsArray[i][1]->setPixmap(onePix, FALSE); } - -// QColor c(199,199,199); -// QPalette labelPalette = cashTopLabelArray[i]->palette(); -// labelPalette.setColor(QPalette::WindowText, c); -// cashTopLabelArray[i]->setPalette(labelPalette); -// cashTopLabelArray[i]->setAutoFillBackground(FALSE); } -// else { -// QColor c(0,0,0); -// QPalette labelPalette = cashTopLabelArray[i]->palette(); -// labelPalette.setColor(QPalette::WindowText, c); -// cashTopLabelArray[i]->setPalette(labelPalette); -// cashTopLabelArray[i]->setAutoFillBackground(FALSE); -// } } } @@ -1588,7 +1583,7 @@ void mainWindowImpl::postRiverRunAnimation3() { // QPalette tempPalette = groupBoxArray[i]->palette(); // tempPalette.setColor(QPalette::Window, highlight); // groupBoxArray[i]->setPalette(tempPalette); - actionLabelArray[i]->setText("

- Winner -

"); + actionLabelArray[i]->setPixmap(QPixmap(":/actions/resources/graphics/actions/action_winner.png")); //nicht gewonnene Karten ausblenden if ( actualHand->getActivePlayersCounter() != 1 && myConfig->readConfigInt("ShowFadeOutCardsAnimation")) { diff --git a/src/gui/qt/resources.qrc b/src/gui/qt/resources.qrc index fbea989c..7f9d8437 100755 --- a/src/gui/qt/resources.qrc +++ b/src/gui/qt/resources.qrc @@ -1,4 +1,14 @@ + + resources/graphics/actions/action_allin.png + resources/graphics/actions/action_bet.png + resources/graphics/actions/action_call.png + resources/graphics/actions/action_check.png + resources/graphics/actions/action_fold.png + resources/graphics/actions/action_raise.png + resources/graphics/actions/action_set.png + resources/graphics/actions/action_winner.png + resources/graphics/cards/0.png resources/graphics/cards/1.png @@ -82,6 +92,6 @@ resources/guiv2/playeraction_03.png resources/guiv2/playeraction_05.png resources/guiv2/playeraction_07.png - resources/guiv2/table.png + resources/guiv2/table.png diff --git a/src/gui/qt/resources/graphics/actions/action_allin.png b/src/gui/qt/resources/graphics/actions/action_allin.png new file mode 100644 index 00000000..f99507e2 Binary files /dev/null and b/src/gui/qt/resources/graphics/actions/action_allin.png differ diff --git a/src/gui/qt/resources/graphics/actions/action_bet.png b/src/gui/qt/resources/graphics/actions/action_bet.png new file mode 100644 index 00000000..82b2a504 Binary files /dev/null and b/src/gui/qt/resources/graphics/actions/action_bet.png differ diff --git a/src/gui/qt/resources/graphics/actions/action_call.png b/src/gui/qt/resources/graphics/actions/action_call.png new file mode 100644 index 00000000..5566174e Binary files /dev/null and b/src/gui/qt/resources/graphics/actions/action_call.png differ diff --git a/src/gui/qt/resources/graphics/actions/action_check.png b/src/gui/qt/resources/graphics/actions/action_check.png new file mode 100644 index 00000000..6f76e635 Binary files /dev/null and b/src/gui/qt/resources/graphics/actions/action_check.png differ diff --git a/src/gui/qt/resources/graphics/actions/action_fold.png b/src/gui/qt/resources/graphics/actions/action_fold.png new file mode 100644 index 00000000..2e56d3bb Binary files /dev/null and b/src/gui/qt/resources/graphics/actions/action_fold.png differ diff --git a/src/gui/qt/resources/graphics/actions/action_raise.png b/src/gui/qt/resources/graphics/actions/action_raise.png new file mode 100644 index 00000000..8051bbf9 Binary files /dev/null and b/src/gui/qt/resources/graphics/actions/action_raise.png differ diff --git a/src/gui/qt/resources/graphics/actions/action_set.png b/src/gui/qt/resources/graphics/actions/action_set.png new file mode 100644 index 00000000..bb655fb1 Binary files /dev/null and b/src/gui/qt/resources/graphics/actions/action_set.png differ diff --git a/src/gui/qt/resources/graphics/actions/action_template.xcf b/src/gui/qt/resources/graphics/actions/action_template.xcf new file mode 100644 index 00000000..5a865810 Binary files /dev/null and b/src/gui/qt/resources/graphics/actions/action_template.xcf differ diff --git a/src/gui/qt/resources/graphics/actions/action_winner.png b/src/gui/qt/resources/graphics/actions/action_winner.png new file mode 100644 index 00000000..7a176f0b Binary files /dev/null and b/src/gui/qt/resources/graphics/actions/action_winner.png differ