starts implementing press pefore playersturn - PART I
This commit is contained in:
@@ -391,13 +391,15 @@ mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent)
|
|||||||
|
|
||||||
// Schriftart laden und für Dialoge setzen
|
// Schriftart laden und für Dialoge setzen
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
QString font1String("font-family: \"Arial\";");
|
font1String = "font-family: \"Arial\";";
|
||||||
// if(this->logicalDpiX() > 105) { tmpFont.setFont("Arial",8); }
|
// if(this->logicalDpiX() > 105) { tmpFont.setFont("Arial",8); }
|
||||||
// else { QFont tmpFont("Arial",9); }
|
// else { QFont tmpFont("Arial",9); }
|
||||||
#else
|
#else
|
||||||
QString font1String("font-family: \"Nimbus Sans L\";");
|
font1String = "font-family: \"Nimbus Sans L\";";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
font2String = "font-family: \"Bitstream Vera Sans\";";
|
||||||
|
|
||||||
//Schriftart und Schriftgrößen für Widgets festlegen
|
//Schriftart und Schriftgrößen für Widgets festlegen
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
textBrowser_Log->setStyleSheet("QTextBrowser { "+ font1String +" font-size: 11px; color: #F0F0F0; background-color: #1D3B00; border:none; }");
|
textBrowser_Log->setStyleSheet("QTextBrowser { "+ font1String +" font-size: 11px; color: #F0F0F0; background-color: #1D3B00; border:none; }");
|
||||||
@@ -422,9 +424,6 @@ mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent)
|
|||||||
// tabWidget_Left->setStyleSheet("QTabWidget::pane { border: 1px solid #286400; border-radius: 2px; background-color: #145300; }");
|
// tabWidget_Left->setStyleSheet("QTabWidget::pane { border: 1px solid #286400; border-radius: 2px; background-color: #145300; }");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
QString font2String("font-family: \"Bitstream Vera Sans\";");
|
|
||||||
|
|
||||||
for (i=0; i<MAX_NUMBER_OF_PLAYERS; i++) {
|
for (i=0; i<MAX_NUMBER_OF_PLAYERS; i++) {
|
||||||
|
|
||||||
cashTopLabelArray[i]->setStyleSheet("QLabel { "+ font2String +" font-size: 10px; font-weight: bold; color: #F0F0F0; }");
|
cashTopLabelArray[i]->setStyleSheet("QLabel { "+ font2String +" font-size: 10px; font-weight: bold; color: #F0F0F0; }");
|
||||||
@@ -483,7 +482,7 @@ mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent)
|
|||||||
groupBoxArray[0]->setStyleSheet("QGroupBox { border:none; background-image: url(" + myAppDataPath +"gfx/gui/table/default/playerBoxInactiveGlow_0.6.png) }");
|
groupBoxArray[0]->setStyleSheet("QGroupBox { border:none; background-image: url(" + myAppDataPath +"gfx/gui/table/default/playerBoxInactiveGlow_0.6.png) }");
|
||||||
|
|
||||||
//Human player button
|
//Human player button
|
||||||
pushButton_BetRaise->setStyleSheet("QPushButton { border:none; background-image: url(" + myAppDataPath +"gfx/gui/table/default/playeraction_03_0.6.png); "+ font2String +" font-size: 11px; font-weight: bold; color: #F0F0F0; }");
|
pushButton_BetRaise->setStyleSheet("QPushButton { border:none; background-image: url(" + myAppDataPath +"gfx/gui/table/default/playeraction_03_0.6.png); "+ font2String +" font-size: 11px; font-weight: bold; color: #F0F0F0; QPushButton }");
|
||||||
pushButton_CallCheckSet->setStyleSheet("QPushButton { border:none; background-image: url(" + myAppDataPath +"gfx/gui/table/default/playeraction_05_0.6.png); "+ font2String +" font-size: 11px; font-weight: bold; color: #F0F0F0; }");
|
pushButton_CallCheckSet->setStyleSheet("QPushButton { border:none; background-image: url(" + myAppDataPath +"gfx/gui/table/default/playeraction_05_0.6.png); "+ font2String +" font-size: 11px; font-weight: bold; color: #F0F0F0; }");
|
||||||
pushButton_FoldAllin->setStyleSheet("QPushButton { border:none; background-image: url(" + myAppDataPath +"gfx/gui/table/default/playeraction_07_0.6.png); "+ font2String +" font-size: 11px; font-weight: bold; color: #F0F0F0; }");
|
pushButton_FoldAllin->setStyleSheet("QPushButton { border:none; background-image: url(" + myAppDataPath +"gfx/gui/table/default/playeraction_07_0.6.png); "+ font2String +" font-size: 11px; font-weight: bold; color: #F0F0F0; }");
|
||||||
|
|
||||||
@@ -2095,25 +2094,9 @@ void mainWindowImpl::dealRiverCards2() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void mainWindowImpl::meInAction() {
|
void mainWindowImpl::provideMyActions() {
|
||||||
|
|
||||||
//fix buttons if escape is pressed during raise or bet
|
|
||||||
// spinBox_set->hide();
|
|
||||||
// pushButton_BetRaise->show();
|
|
||||||
|
|
||||||
horizontalSlider_bet->setEnabled(TRUE);
|
|
||||||
spinBox_set->setEnabled(TRUE);
|
|
||||||
|
|
||||||
myActionIsRaise = 0;
|
|
||||||
myActionIsBet = 0;
|
|
||||||
|
|
||||||
if(myConfig->readConfigInt("ShowStatusbarMessages")) {
|
|
||||||
if ( myConfig->readConfigInt("AlternateFKeysUserActionMode") == 0 ) {
|
|
||||||
statusBar()->showMessage(tr("F1 - Fold/All-In | F2 - Check/Call | F3 - Bet/Raise"), 15000);
|
|
||||||
} else {
|
|
||||||
statusBar()->showMessage(tr("F1 - Bet/Raise | F2 - Check/Call | F3 - Fold/All-In"), 15000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Game *currentGame = mySession->getCurrentGame();
|
Game *currentGame = mySession->getCurrentGame();
|
||||||
HandInterface *currentHand = currentGame->getCurrentHand();
|
HandInterface *currentHand = currentGame->getCurrentHand();
|
||||||
|
|
||||||
@@ -2182,6 +2165,31 @@ void mainWindowImpl::meInAction() {
|
|||||||
break;
|
break;
|
||||||
default: {}
|
default: {}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void mainWindowImpl::meInAction() {
|
||||||
|
|
||||||
|
//fix buttons if escape is pressed during raise or bet
|
||||||
|
// spinBox_set->hide();
|
||||||
|
// pushButton_BetRaise->show();
|
||||||
|
|
||||||
|
myButtonsCheckable(FALSE);
|
||||||
|
|
||||||
|
horizontalSlider_bet->setEnabled(TRUE);
|
||||||
|
spinBox_set->setEnabled(TRUE);
|
||||||
|
|
||||||
|
myActionIsRaise = 0;
|
||||||
|
myActionIsBet = 0;
|
||||||
|
|
||||||
|
if(myConfig->readConfigInt("ShowStatusbarMessages")) {
|
||||||
|
if ( myConfig->readConfigInt("AlternateFKeysUserActionMode") == 0 ) {
|
||||||
|
statusBar()->showMessage(tr("F1 - Fold/All-In | F2 - Check/Call | F3 - Bet/Raise"), 15000);
|
||||||
|
} else {
|
||||||
|
statusBar()->showMessage(tr("F1 - Bet/Raise | F2 - Check/Call | F3 - Fold/All-In"), 15000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
provideMyActions();
|
||||||
|
|
||||||
myBetRaise();
|
myBetRaise();
|
||||||
|
|
||||||
@@ -2226,9 +2234,11 @@ void mainWindowImpl::disableMyButtons() {
|
|||||||
horizontalSlider_bet->setDisabled(TRUE);
|
horizontalSlider_bet->setDisabled(TRUE);
|
||||||
// spinBox_set->hide();
|
// spinBox_set->hide();
|
||||||
// pushButton_BetRaise->show();
|
// pushButton_BetRaise->show();
|
||||||
pushButton_BetRaise->setText("");
|
// pushButton_BetRaise->setText("");
|
||||||
pushButton_CallCheckSet->setText("");
|
// pushButton_CallCheckSet->setText("");
|
||||||
pushButton_FoldAllin->setText("");
|
// pushButton_FoldAllin->setText("");
|
||||||
|
|
||||||
|
myButtonsCheckable(TRUE);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2252,12 +2262,17 @@ void mainWindowImpl::myBetRaise() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void mainWindowImpl::myFoldAllin() {
|
void mainWindowImpl::myFoldAllin() {
|
||||||
if(pushButton_FoldAllin->text() == "Fold") { myFold(); }
|
if(!pushButton_FoldAllin->isCheckable()) {
|
||||||
|
if(pushButton_FoldAllin->text() == "Fold") { myFold(); }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void mainWindowImpl::myCallCheckSet() {
|
void mainWindowImpl::myCallCheckSet() {
|
||||||
if(pushButton_CallCheckSet->text().startsWith("Call")) { myCall(); }
|
|
||||||
if(pushButton_CallCheckSet->text() == "Check") { myCheck(); }
|
if(!pushButton_CallCheckSet->isCheckable()) {
|
||||||
|
if(pushButton_CallCheckSet->text().startsWith("Call")) { myCall(); }
|
||||||
|
if(pushButton_CallCheckSet->text() == "Check") { myCheck(); }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2376,7 +2391,7 @@ void mainWindowImpl::myRaise(){
|
|||||||
|
|
||||||
void mainWindowImpl::mySet(){
|
void mainWindowImpl::mySet(){
|
||||||
|
|
||||||
if(pushButton_BetRaise->text() != "") {
|
if(!pushButton_BetRaise->isCheckable() && pushButton_BetRaise->text() != "") {
|
||||||
|
|
||||||
HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand();
|
HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand();
|
||||||
int tempCash = currentHand->getSeatsList()->front()->getMyCash();
|
int tempCash = currentHand->getSeatsList()->front()->getMyCash();
|
||||||
@@ -2488,10 +2503,11 @@ void mainWindowImpl::nextPlayerAnimation() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
refreshAction(currentHand->getLastPlayersTurn(), (*it_c)->getMyAction());
|
refreshAction(currentHand->getLastPlayersTurn(), (*it_c)->getMyAction());
|
||||||
|
|
||||||
|
|
||||||
refreshCash();
|
refreshCash();
|
||||||
|
|
||||||
|
//refresh actions for human player
|
||||||
|
provideMyActions();
|
||||||
|
|
||||||
nextPlayerAnimationTimer->start(nextPlayerSpeed1);
|
nextPlayerAnimationTimer->start(nextPlayerSpeed1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3887,6 +3903,34 @@ void mainWindowImpl::mouseOverFlipCards(bool front) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void mainWindowImpl::myButtonsCheckable(bool state) {
|
||||||
|
|
||||||
|
if(state) {
|
||||||
|
//checkable
|
||||||
|
|
||||||
|
pushButton_BetRaise->setCheckable(TRUE);
|
||||||
|
pushButton_CallCheckSet->setCheckable(TRUE);
|
||||||
|
pushButton_FoldAllin->setCheckable(TRUE);
|
||||||
|
|
||||||
|
//design
|
||||||
|
pushButton_BetRaise->setStyleSheet("QPushButton { border:none; background-image: url(" + myAppDataPath +"gfx/gui/table/default/playeraction_03_0.6.png); "+ font2String +" font-size: 11px; font-weight: bold; color: #28E74B; }");
|
||||||
|
pushButton_CallCheckSet->setStyleSheet("QPushButton { border:none; background-image: url(" + myAppDataPath +"gfx/gui/table/default/playeraction_05_0.6.png); "+ font2String +" font-size: 11px; font-weight: bold; color: #009DFF; }");
|
||||||
|
pushButton_FoldAllin->setStyleSheet("QPushButton { border:none; background-image: url(" + myAppDataPath +"gfx/gui/table/default/playeraction_07_0.6.png); "+ font2String +" font-size: 11px; font-weight: bold; color: #FF1E1E; }");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//not checkable
|
||||||
|
|
||||||
|
pushButton_BetRaise->setCheckable(FALSE);
|
||||||
|
pushButton_CallCheckSet->setCheckable(FALSE);
|
||||||
|
pushButton_FoldAllin->setCheckable(FALSE);
|
||||||
|
|
||||||
|
//design
|
||||||
|
pushButton_BetRaise->setStyleSheet("QPushButton { border:none; background-image: url(" + myAppDataPath +"gfx/gui/table/default/playeraction_03_0.6.png); "+ font2String +" font-size: 11px; font-weight: bold; color: #F0F0F0; QPushButton }");
|
||||||
|
pushButton_CallCheckSet->setStyleSheet("QPushButton { border:none; background-image: url(" + myAppDataPath +"gfx/gui/table/default/playeraction_05_0.6.png); "+ font2String +" font-size: 11px; font-weight: bold; color: #F0F0F0; }");
|
||||||
|
pushButton_FoldAllin->setStyleSheet("QPushButton { border:none; background-image: url(" + myAppDataPath +"gfx/gui/table/default/playeraction_07_0.6.png); "+ font2String +" font-size: 11px; font-weight: bold; color: #F0F0F0; }");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void mainWindowImpl::closeEvent(QCloseEvent* /*event*/) { quitPokerTH(); }
|
void mainWindowImpl::closeEvent(QCloseEvent* /*event*/) { quitPokerTH(); }
|
||||||
|
|
||||||
void mainWindowImpl::quitPokerTH() {
|
void mainWindowImpl::quitPokerTH() {
|
||||||
|
|||||||
@@ -180,6 +180,7 @@ public slots:
|
|||||||
void dealHoleCards();
|
void dealHoleCards();
|
||||||
|
|
||||||
//Spieler-Funktionen
|
//Spieler-Funktionen
|
||||||
|
void provideMyActions();
|
||||||
void meInAction();
|
void meInAction();
|
||||||
void disableMyButtons();
|
void disableMyButtons();
|
||||||
void startTimeoutAnimation(int playerId, int timoutSec);
|
void startTimeoutAnimation(int playerId, int timoutSec);
|
||||||
@@ -305,6 +306,8 @@ public slots:
|
|||||||
|
|
||||||
void mouseOverFlipCards(bool front);
|
void mouseOverFlipCards(bool front);
|
||||||
|
|
||||||
|
void myButtonsCheckable(bool state);
|
||||||
|
|
||||||
void changePlayingMode();
|
void changePlayingMode();
|
||||||
|
|
||||||
void quitPokerTH();
|
void quitPokerTH();
|
||||||
@@ -419,6 +422,8 @@ private:
|
|||||||
int distributePotAnimCounter;
|
int distributePotAnimCounter;
|
||||||
int playingMode;
|
int playingMode;
|
||||||
|
|
||||||
|
QString font2String;
|
||||||
|
QString font1String;
|
||||||
|
|
||||||
//Speed
|
//Speed
|
||||||
int guiGameSpeed;
|
int guiGameSpeed;
|
||||||
|
|||||||
Reference in New Issue
Block a user