diff --git a/data/gfx/gui/table/danuxi1/danuxi1tablestyle.xml b/data/gfx/gui/table/danuxi1/danuxi1tablestyle.xml index 945f6d61..1710ec24 100644 --- a/data/gfx/gui/table/danuxi1/danuxi1tablestyle.xml +++ b/data/gfx/gui/table/danuxi1/danuxi1tablestyle.xml @@ -11,13 +11,6 @@ - - - - - - - @@ -53,6 +46,24 @@ + + + + + + + + + + + + + + + + + + diff --git a/data/gfx/gui/table/default/defaulttablestyle.xml b/data/gfx/gui/table/default/defaulttablestyle.xml index 2d686e02..6eb9fb0e 100644 --- a/data/gfx/gui/table/default/defaulttablestyle.xml +++ b/data/gfx/gui/table/default/defaulttablestyle.xml @@ -50,14 +50,24 @@
- - - - - - - - + + + + + + + + + + + + + + + + + + diff --git a/src/gui/qt/gametable/gametableimpl.cpp b/src/gui/qt/gametable/gametableimpl.cpp index dfcd95bc..075c5643 100755 --- a/src/gui/qt/gametable/gametableimpl.cpp +++ b/src/gui/qt/gametable/gametableimpl.cpp @@ -686,7 +686,7 @@ void gameTableImpl::refreshSet() { if( (*it_c)->getMySet() == 0 ) setLabelArray[(*it_c)->getMyID()]->setText(""); else - setLabelArray[(*it_c)->getMyID()]->setText("Bet: $"+QString::number((*it_c)->getMySet(),10)); + setLabelArray[(*it_c)->getMyID()]->setText(BetString+": $"+QString::number((*it_c)->getMySet(),10)); } } @@ -1312,45 +1312,45 @@ void gameTableImpl::provideMyActions(int mode) { if(currentHand->getCurrentRound() == 0) { // preflop if (currentGame->getSeatsList()->front()->getMyCash()+currentGame->getSeatsList()->front()->getMySet() > currentHand->getCurrentBeRo()->getHighestSet()) { - pushButtonBetRaiseString = "Raise $"+QString::number(getMyBetAmount()); + pushButtonBetRaiseString = RaiseString+" $"+QString::number(getMyBetAmount()); } - if (currentGame->getSeatsList()->front()->getMySet()== currentHand->getCurrentBeRo()->getHighestSet() && currentGame->getSeatsList()->front()->getMyButton() == 3) { pushButtonCallCheckString = "Check"; } - else { pushButtonCallCheckString = "Call $"+QString::number(getMyCallAmount()); } + if (currentGame->getSeatsList()->front()->getMySet()== currentHand->getCurrentBeRo()->getHighestSet() && currentGame->getSeatsList()->front()->getMyButton() == 3) { pushButtonCallCheckString = CheckString; } + else { pushButtonCallCheckString = CallString+" $"+QString::number(getMyCallAmount()); } - pushButtonFoldString = "Fold"; - pushButtonAllInString = "All-In"; + pushButtonFoldString = FoldString; + pushButtonAllInString = AllInString; refreshActionButtonFKeyIndicator(); } else { // flop,turn,river if (currentHand->getCurrentBeRo()->getHighestSet() == 0 && pushButton_Fold->isCheckable() ) { - pushButtonFoldString = "Check / Fold"; + pushButtonFoldString = CheckString+" / "+FoldString; } - else { pushButtonFoldString = "Fold"; } + else { pushButtonFoldString = FoldString; } if (currentHand->getCurrentBeRo()->getHighestSet() == 0) { - pushButtonCallCheckString = "Check"; - pushButtonBetRaiseString = "Bet $"+QString::number(getMyBetAmount()); + pushButtonCallCheckString = CheckString; + pushButtonBetRaiseString = BetString+" $"+QString::number(getMyBetAmount()); } if (currentHand->getCurrentBeRo()->getHighestSet() > 0 && currentHand->getCurrentBeRo()->getHighestSet() > currentGame->getSeatsList()->front()->getMySet()) { - pushButtonCallCheckString = "Call $"+QString::number(getMyCallAmount()); + pushButtonCallCheckString = CallString+" $"+QString::number(getMyCallAmount()); if (currentGame->getSeatsList()->front()->getMyCash()+currentGame->getSeatsList()->front()->getMySet() > currentHand->getCurrentBeRo()->getHighestSet()) { - pushButtonBetRaiseString = "Raise $"+QString::number(getMyBetAmount()); + pushButtonBetRaiseString = RaiseString+" $"+QString::number(getMyBetAmount()); } } - pushButtonAllInString = "All-In"; + pushButtonAllInString = AllInString; refreshActionButtonFKeyIndicator(); } if(mode == 0) { if( currentHand->getSeatsList()->front()->getMyAction() != PLAYER_ACTION_FOLD ) { - pushButtonBetRaiseString = "Bet $"+QString::number(getMyBetAmount()); - pushButtonCallCheckString = "Check"; - if( (currentGame->getActivePlayerList()->size() > 2 && currentGame->getSeatsList()->front()->getMyButton() == BUTTON_SMALL_BLIND ) || ( currentGame->getActivePlayerList()->size() <= 2 && currentGame->getSeatsList()->front()->getMyButton() == BUTTON_BIG_BLIND)) { pushButtonFoldString = "Fold"; } - else { pushButtonFoldString = "Check / Fold"; } + pushButtonBetRaiseString = BetString+" $"+QString::number(getMyBetAmount()); + pushButtonCallCheckString = CheckString; + if( (currentGame->getActivePlayerList()->size() > 2 && currentGame->getSeatsList()->front()->getMyButton() == BUTTON_SMALL_BLIND ) || ( currentGame->getActivePlayerList()->size() <= 2 && currentGame->getSeatsList()->front()->getMyButton() == BUTTON_BIG_BLIND)) { pushButtonFoldString = FoldString; } + else { pushButtonFoldString = CheckString+" / "+FoldString; } - pushButtonAllInString = "All-In"; + pushButtonAllInString = AllInString; refreshActionButtonFKeyIndicator(); } else { @@ -1387,7 +1387,8 @@ void gameTableImpl::provideMyActions(int mode) { pushButton_AllIn->setText(pushButtonAllInString); // myBetRaise(); - if(pushButton_BetRaise->text().startsWith("Raise")) { + + if(pushButton_BetRaise->text().startsWith(RaiseString)) { horizontalSlider_bet->setMinimum(currentHand->getCurrentBeRo()->getHighestSet() - currentHand->getSeatsList()->front()->getMySet() + currentHand->getCurrentBeRo()->getMinimumRaise()); horizontalSlider_bet->setMaximum(currentHand->getSeatsList()->front()->getMyCash()); @@ -1395,7 +1396,7 @@ void gameTableImpl::provideMyActions(int mode) { myActionIsRaise = 1; } - else if(pushButton_BetRaise->text().startsWith("Bet")) { + else if(pushButton_BetRaise->text().startsWith(BetString)) { horizontalSlider_bet->setMinimum(currentHand->getSmallBlind()*2); horizontalSlider_bet->setMaximum(currentHand->getSeatsList()->front()->getMyCash()); @@ -1482,7 +1483,7 @@ void gameTableImpl::meInAction() { myCallCheck(); break; case 2: // Auto check / fold all - if (pushButton_CallCheck->text() == "Check") { + if (pushButton_CallCheck->text() == CheckString) { myCheck(); } else { myFold(); @@ -1527,13 +1528,13 @@ void gameTableImpl::disableMyButtons() { void gameTableImpl::myCallCheck() { - if(pushButton_CallCheck->text().startsWith("Call")) { myCall(); } - if(pushButton_CallCheck->text() == "Check") { myCheck(); } + if(pushButton_CallCheck->text().startsWith(CallString)) { myCall(); } + if(pushButton_CallCheck->text() == CheckString) { myCheck(); } } void gameTableImpl::myFold(){ - if(pushButton_Fold->text() == "Fold") { + if(pushButton_Fold->text() == FoldString) { HandInterface *currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand(); currentHand->getSeatsList()->front()->setMyAction(1); @@ -3241,6 +3242,20 @@ void gameTableImpl::refreshGameTableStyle() myGameTableStyle->setTabWidgetStyle(tabWidget_Left, tabWidget_Left->getMyTabBar()); label_Handranking->setPixmap(myGameTableStyle->getHandRanking()); + + if(myConfig->readConfigInt("DontTranslateInternationalPokerStringsFromStyle") || myGameTableStyle->getActionCallI18NString() == "NULL") { CallString = "Call"; } + else { CallString = myGameTableStyle->getActionCallI18NString(); } + if(myConfig->readConfigInt("DontTranslateInternationalPokerStringsFromStyle") || myGameTableStyle->getActionCheckI18NString() == "NULL") { CheckString = "Check"; } + else { CheckString = myGameTableStyle->getActionCheckI18NString(); } + if(myConfig->readConfigInt("DontTranslateInternationalPokerStringsFromStyle") || myGameTableStyle->getActionBetI18NString() == "NULL") { BetString = "Bet"; } + else { BetString = myGameTableStyle->getActionBetI18NString(); } + if(myConfig->readConfigInt("DontTranslateInternationalPokerStringsFromStyle") || myGameTableStyle->getActionRaiseI18NString() == "NULL") { RaiseString = "Raise"; } + else { RaiseString = myGameTableStyle->getActionRaiseI18NString(); } + if(myConfig->readConfigInt("DontTranslateInternationalPokerStringsFromStyle") || myGameTableStyle->getActionFoldI18NString() == "NULL") { FoldString = "Fold"; } + else { FoldString = myGameTableStyle->getActionFoldI18NString(); } + if(myConfig->readConfigInt("DontTranslateInternationalPokerStringsFromStyle") || myGameTableStyle->getActionAllInI18NString() == "NULL") { AllInString = "All-In"; } + else { AllInString = myGameTableStyle->getActionAllInI18NString(); } + } void gameTableImpl::saveGameTableGeometry() diff --git a/src/gui/qt/gametable/gametableimpl.h b/src/gui/qt/gametable/gametableimpl.h index d031b6e9..f2f789d6 100755 --- a/src/gui/qt/gametable/gametableimpl.h +++ b/src/gui/qt/gametable/gametableimpl.h @@ -418,6 +418,13 @@ private: GameTableStyleReader *myGameTableStyle; CardDeckStyleReader *myCardDeckStyle; + QString AllInString; + QString RaiseString; + QString BetString; + QString CallString; + QString CheckString; + QString FoldString; + friend class GuiWrapper; }; diff --git a/src/gui/qt/styles/gametablestylereader.cpp b/src/gui/qt/styles/gametablestylereader.cpp index 2e85b7b4..0bc698b1 100644 --- a/src/gui/qt/styles/gametablestylereader.cpp +++ b/src/gui/qt/styles/gametablestylereader.cpp @@ -117,13 +117,13 @@ void GameTableStyleReader::readStyleFile(QString file) { else if (itemsList->ValueStr() == "MaximumWindowHeight") { MaximumWindowHeight = QString::fromUtf8(tempString1.c_str()); } // PICS else if (itemsList->ValueStr() == "Preview") { Preview = currentDir+QString::fromUtf8(tempString1.c_str()); } - else if (itemsList->ValueStr() == "ActionAllInI18N") { ActionAllInI18N = currentDir+QString::fromUtf8(tempString1.c_str()); } - else if (itemsList->ValueStr() == "ActionRaiseI18N") { ActionRaiseI18N = currentDir+QString::fromUtf8(tempString1.c_str()); } - else if (itemsList->ValueStr() == "ActionBetI18N") { ActionBetI18N = currentDir+QString::fromUtf8(tempString1.c_str()); } - else if (itemsList->ValueStr() == "ActionCallI18N") { ActionCallI18N = currentDir+QString::fromUtf8(tempString1.c_str()); } - else if (itemsList->ValueStr() == "ActionCheckI18N") { ActionCheckI18N = currentDir+QString::fromUtf8(tempString1.c_str()); } - else if (itemsList->ValueStr() == "ActionFoldI18N") { ActionFoldI18N = currentDir+QString::fromUtf8(tempString1.c_str()); } - else if (itemsList->ValueStr() == "ActionWinnerI18N") { ActionWinnerI18N = currentDir+QString::fromUtf8(tempString1.c_str()); } + else if (itemsList->ValueStr() == "ActionAllInI18NPic") { ActionAllInI18NPic = currentDir+QString::fromUtf8(tempString1.c_str()); } + else if (itemsList->ValueStr() == "ActionRaiseI18NPic") { ActionRaiseI18NPic = currentDir+QString::fromUtf8(tempString1.c_str()); } + else if (itemsList->ValueStr() == "ActionBetI18NPic") { ActionBetI18NPic = currentDir+QString::fromUtf8(tempString1.c_str()); } + else if (itemsList->ValueStr() == "ActionCallI18NPic") { ActionCallI18NPic = currentDir+QString::fromUtf8(tempString1.c_str()); } + else if (itemsList->ValueStr() == "ActionCheckI18NPic") { ActionCheckI18NPic = currentDir+QString::fromUtf8(tempString1.c_str()); } + else if (itemsList->ValueStr() == "ActionFoldI18NPic") { ActionFoldI18NPic = currentDir+QString::fromUtf8(tempString1.c_str()); } + else if (itemsList->ValueStr() == "ActionWinnerI18NPic") { ActionWinnerI18NPic = currentDir+QString::fromUtf8(tempString1.c_str()); } else if (itemsList->ValueStr() == "BigBlindPuck") { BigBlindPuck = currentDir+QString::fromUtf8(tempString1.c_str()); } else if (itemsList->ValueStr() == "SmallBlindPuck") { SmallBlindPuck = currentDir+QString::fromUtf8(tempString1.c_str()); } else if (itemsList->ValueStr() == "DealerPuck") { DealerPuck = currentDir+QString::fromUtf8(tempString1.c_str()); } @@ -159,6 +159,15 @@ void GameTableStyleReader::readStyleFile(QString file) { else if (itemsList->ValueStr() == "Table") { Table = currentDir+QString::fromUtf8(tempString1.c_str()); } else if (itemsList->ValueStr() == "HandRanking") { HandRanking = currentDir+QString::fromUtf8(tempString1.c_str()); } else if (itemsList->ValueStr() == "ToolBoxBackground") { ToolBoxBackground = currentDir+QString::fromUtf8(tempString1.c_str()); } + + //I18N ACTION STRINGS + else if (itemsList->ValueStr() == "ActionAllInI18NString") { ActionAllInI18NString = QString::fromUtf8(tempString1.c_str()); } + else if (itemsList->ValueStr() == "ActionRaiseI18NString") { ActionRaiseI18NString = QString::fromUtf8(tempString1.c_str()); } + else if (itemsList->ValueStr() == "ActionBetI18NString") { ActionBetI18NString = QString::fromUtf8(tempString1.c_str()); } + else if (itemsList->ValueStr() == "ActionCallI18NString") { ActionCallI18NString = QString::fromUtf8(tempString1.c_str()); } + else if (itemsList->ValueStr() == "ActionCheckI18NString") { ActionCheckI18NString = QString::fromUtf8(tempString1.c_str()); } + else if (itemsList->ValueStr() == "ActionFoldI18NString") { ActionFoldI18NString = QString::fromUtf8(tempString1.c_str()); } + // COLORS else if (itemsList->ValueStr() == "FKeyIndicatorColor") { FKeyIndicatorColor = QString::fromUtf8(tempString1.c_str()); } else if (itemsList->ValueStr() == "ChanceLabelPossibleColor") { ChanceLabelPossibleColor = QString::fromUtf8(tempString1.c_str()); } @@ -233,52 +242,140 @@ void GameTableStyleReader::readStyleFile(QString file) { if(MaximumWindowWidth == "") { leftItems << "MaximumWindowWidth"; } if(MaximumWindowHeight == "") { leftItems << "MaximumWindowHeight"; } // PICS - if(ActionAllInI18N == "") { leftItems << "ActionAllInI18N"; } - else if(ActionAllInI18N != QString(currentDir+"NULL") && !QFile(ActionAllInI18N).exists()) { itemPicsLeft << "ActionAllInI18N = "+ActionAllInI18N; } - if(ActionRaiseI18N == "") { leftItems << "ActionRaiseI18N"; } - else if(ActionRaiseI18N != QString(currentDir+"NULL") && !QFile(ActionRaiseI18N).exists()) { itemPicsLeft << "ActionRaiseI18N = "+ActionRaiseI18N; } - if(ActionBetI18N == "") { leftItems << "ActionBetI18N"; } - else if(ActionBetI18N != QString(currentDir+"NULL") && !QFile(ActionBetI18N).exists()) { itemPicsLeft << "ActionBetI18N = "+ActionBetI18N; } - if(ActionCallI18N == "") { leftItems << "ActionCallI18N"; } - else if(ActionCallI18N != QString(currentDir+"NULL") && !QFile(ActionCallI18N).exists()) { itemPicsLeft << "ActionCallI18N = "+ActionCallI18N; } - if(ActionCheckI18N == "") { leftItems << "ActionCheckI18N"; } - if(ActionFoldI18N == "") { leftItems << "ActionFoldI18N"; } - if(ActionWinnerI18N == "") { leftItems << "ActionWinnerI18N"; } + if(ActionAllInI18NPic == "") { leftItems << "ActionAllInI18NPic"; } + else if(ActionAllInI18NPic != QString(currentDir+"NULL") && !QFile(ActionAllInI18NPic).exists()) { itemPicsLeft << "ActionAllInI18NPic = "+ActionAllInI18NPic; } + + if(ActionRaiseI18NPic == "") { leftItems << "ActionRaiseI18NPic"; } + else if(ActionRaiseI18NPic != QString(currentDir+"NULL") && !QFile(ActionRaiseI18NPic).exists()) { itemPicsLeft << "ActionRaiseI18NPic = "+ActionRaiseI18NPic; } + + if(ActionBetI18NPic == "") { leftItems << "ActionBetI18NPic"; } + else if(ActionBetI18NPic != QString(currentDir+"NULL") && !QFile(ActionBetI18NPic).exists()) { itemPicsLeft << "ActionBetI18NPic = "+ActionBetI18NPic; } + + if(ActionCallI18NPic == "") { leftItems << "ActionCallI18NPic"; } + else if(ActionCallI18NPic != QString(currentDir+"NULL") && !QFile(ActionCallI18NPic).exists()) { itemPicsLeft << "ActionCallI18NPic = "+ActionCallI18NPic; } + + if(ActionCheckI18NPic == "") { leftItems << "ActionCheckI18NPic"; } + else if(ActionCheckI18NPic != QString(currentDir+"NULL") && !QFile(ActionCheckI18NPic).exists()) { itemPicsLeft << "ActionCheckI18NPic = "+ActionCheckI18NPic; } + + if(ActionFoldI18NPic == "") { leftItems << "ActionFoldI18NPic"; } + else if(ActionFoldI18NPic != QString(currentDir+"NULL") && !QFile(ActionFoldI18NPic).exists()) { itemPicsLeft << "ActionFoldI18NPic = "+ActionFoldI18NPic; } + + if(ActionWinnerI18NPic == "") { leftItems << "ActionWinnerI18NPic"; } + else if(ActionWinnerI18NPic != QString(currentDir+"NULL") && !QFile(ActionWinnerI18NPic).exists()) { itemPicsLeft << "ActionWinnerI18NPic = "+ActionWinnerI18NPic; } + if(BigBlindPuck == "") { leftItems << "BigBlindPuck"; } + else if(BigBlindPuck != QString(currentDir+"NULL") && !QFile(BigBlindPuck).exists()) { itemPicsLeft << "BigBlindPuck = "+BigBlindPuck; } + if(SmallBlindPuck == "") { leftItems << "SmallBlindPuck"; } + else if(SmallBlindPuck != QString(currentDir+"NULL") && !QFile(SmallBlindPuck).exists()) { itemPicsLeft << "SmallBlindPuck = "+SmallBlindPuck; } + if(DealerPuck == "") { leftItems << "DealerPuck"; } + else if(DealerPuck != QString(currentDir+"NULL") && !QFile(DealerPuck).exists()) { itemPicsLeft << "DealerPuck = "+DealerPuck; } + if(DefaultAvatar == "") { leftItems << "DefaultAvatar"; } + else if(DefaultAvatar != QString(currentDir+"NULL") && !QFile(DefaultAvatar).exists()) { itemPicsLeft << "DefaultAvatar = "+DefaultAvatar; } + if(CardHolderFlop == "") { leftItems << "CardHolderFlop"; } + else if(CardHolderFlop != QString(currentDir+"NULL") && !QFile(CardHolderFlop).exists()) { itemPicsLeft << "CardHolderFlop = "+CardHolderFlop; } + if(CardHolderTurn == "") { leftItems << "CardHolderTurn"; } + else if(CardHolderTurn != QString(currentDir+"NULL") && !QFile(CardHolderTurn).exists()) { itemPicsLeft << "CardHolderTurn = "+CardHolderTurn; } + if(CardHolderRiver == "") { leftItems << "CardHolderRiver"; } + else if(CardHolderRiver != QString(currentDir+"NULL") && !QFile(CardHolderRiver).exists()) { itemPicsLeft << "CardHolderRiver = "+CardHolderRiver; } + if(FoldButtonDefault == "") { leftItems << "FoldButtonDefault"; } + else if(FoldButtonDefault != QString(currentDir+"NULL") && !QFile(FoldButtonDefault).exists()) { itemPicsLeft << "FoldButtonDefault = "+FoldButtonDefault; } + if(FoldButtonHover == "") { leftItems << "FoldButtonHover"; } + else if(FoldButtonHover != QString(currentDir+"NULL") && !QFile(FoldButtonHover).exists()) { itemPicsLeft << "FoldButtonHover = "+FoldButtonHover; } + if(FoldButtonChecked == "") { leftItems << "FoldButtonChecked"; } + else if(FoldButtonChecked != QString(currentDir+"NULL") && !QFile(FoldButtonChecked).exists()) { itemPicsLeft << "FoldButtonChecked = "+FoldButtonChecked; } + if(FoldButtonCheckedHover == "") { leftItems << "FoldButtonCheckedHover"; } + else if(FoldButtonCheckedHover != QString(currentDir+"NULL") && !QFile(FoldButtonCheckedHover).exists()) { itemPicsLeft << "FoldButtonCheckedHover = "+FoldButtonCheckedHover; } + if(CheckCallButtonDefault == "") { leftItems << "CheckCallButtonDefault"; } + else if(CheckCallButtonDefault != QString(currentDir+"NULL") && !QFile(CheckCallButtonDefault).exists()) { itemPicsLeft << "CheckCallButtonDefault = "+CheckCallButtonDefault; } + if(CheckCallButtonHover == "") { leftItems << "CheckCallButtonHover"; } + else if(CheckCallButtonHover != QString(currentDir+"NULL") && !QFile(CheckCallButtonHover).exists()) { itemPicsLeft << "CheckCallButtonHover = "+CheckCallButtonHover; } + if(CheckCallButtonChecked == "") { leftItems << "CheckCallButtonChecked"; } + else if(CheckCallButtonChecked != QString(currentDir+"NULL") && !QFile(CheckCallButtonChecked).exists()) { itemPicsLeft << "CheckCallButtonChecked = "+CheckCallButtonChecked; } + if(CheckCallButtonCheckedHover == "") { leftItems << "CheckCallButtonCheckedHover"; } + else if(CheckCallButtonCheckedHover != QString(currentDir+"NULL") && !QFile(CheckCallButtonCheckedHover).exists()) { itemPicsLeft << "CheckCallButtonCheckedHover = "+CheckCallButtonCheckedHover; } + if(BetRaiseButtonDefault == "") { leftItems << "BetRaiseButtonDefault"; } + else if(BetRaiseButtonDefault != QString(currentDir+"NULL") && !QFile(BetRaiseButtonDefault).exists()) { itemPicsLeft << "BetRaiseButtonDefault = "+BetRaiseButtonDefault; } + if(BetRaiseButtonHover == "") { leftItems << "BetRaiseButtonHover"; } + else if(BetRaiseButtonHover != QString(currentDir+"NULL") && !QFile(BetRaiseButtonHover).exists()) { itemPicsLeft << "BetRaiseButtonHover = "+BetRaiseButtonHover; } + if(BetRaiseButtonChecked == "") { leftItems << "BetRaiseButtonChecked"; } + else if(BetRaiseButtonChecked != QString(currentDir+"NULL") && !QFile(BetRaiseButtonChecked).exists()) { itemPicsLeft << "BetRaiseButtonChecked = "+BetRaiseButtonChecked; } + if(BetRaiseButtonCheckedHover == "") { leftItems << "BetRaiseButtonCheckedHover"; } + else if(BetRaiseButtonCheckedHover != QString(currentDir+"NULL") && !QFile(BetRaiseButtonCheckedHover).exists()) { itemPicsLeft << "BetRaiseButtonCheckedHover = "+BetRaiseButtonCheckedHover; } + if(AllInButtonDefault == "") { leftItems << "AllInButtonDefault"; } + else if(AllInButtonDefault != QString(currentDir+"NULL") && !QFile(AllInButtonDefault).exists()) { itemPicsLeft << "AllInButtonDefault = "+AllInButtonDefault; } + if(AllInButtonHover == "") { leftItems << "AllInButtonHover"; } + else if(AllInButtonHover != QString(currentDir+"NULL") && !QFile(AllInButtonHover).exists()) { itemPicsLeft << "AllInButtonHover = "+AllInButtonHover; } + if(AllInButtonChecked == "") { leftItems << "AllInButtonChecked"; } + else if(AllInButtonChecked != QString(currentDir+"NULL") && !QFile(AllInButtonChecked).exists()) { itemPicsLeft << "AllInButtonChecked = "+AllInButtonChecked; } + if(AllInButtonCheckedHover == "") { leftItems << "AllInButtonCheckedHover"; } + else if(AllInButtonCheckedHover != QString(currentDir+"NULL") && !QFile(AllInButtonCheckedHover).exists()) { itemPicsLeft << "AllInButtonCheckedHover = "+AllInButtonCheckedHover; } + if(RadioButtonPressed == "") { leftItems << "RadioButtonPressed"; } + else if(RadioButtonPressed != QString(currentDir+"NULL") && !QFile(RadioButtonPressed).exists()) { itemPicsLeft << "RadioButtonPressed = "+RadioButtonPressed; } + if(RadioButtonChecked == "") { leftItems << "RadioButtonChecked"; } + else if(RadioButtonChecked != QString(currentDir+"NULL") && !QFile(RadioButtonChecked).exists()) { itemPicsLeft << "RadioButtonChecked = "+RadioButtonChecked; } + if(RadioButtonCheckedHover == "") { leftItems << "RadioButtonCheckedHover"; } + else if(RadioButtonCheckedHover != QString(currentDir+"NULL") && !QFile(RadioButtonCheckedHover).exists()) { itemPicsLeft << "RadioButtonCheckedHover = "+RadioButtonCheckedHover; } + if(RadioButtonUnchecked == "") { leftItems << "RadioButtonUnchecked"; } + else if(RadioButtonUnchecked != QString(currentDir+"NULL") && !QFile(RadioButtonUnchecked).exists()) { itemPicsLeft << "RadioButtonUnchecked = "+RadioButtonUnchecked; } + if(RadioButtonUncheckedHover == "") { leftItems << "RadioButtonUncheckedHover"; } + else if(RadioButtonUncheckedHover != QString(currentDir+"NULL") && !QFile(RadioButtonUncheckedHover).exists()) { itemPicsLeft << "RadioButtonUncheckedHover = "+RadioButtonUncheckedHover; } + if(PlayerTopSeatActive == "") { leftItems << "PlayerTopSeatActive"; } + else if(PlayerTopSeatActive != QString(currentDir+"NULL") && !QFile(PlayerTopSeatActive).exists()) { itemPicsLeft << "PlayerTopSeatActive = "+PlayerTopSeatActive; } + if(PlayerTopSeatInactive == "") { leftItems << "PlayerTopSeatInactive"; } + else if(PlayerTopSeatInactive != QString(currentDir+"NULL") && !QFile(PlayerTopSeatInactive).exists()) { itemPicsLeft << "PlayerTopSeatInactive = "+PlayerTopSeatInactive; } + if(PlayerBottomSeatActive == "") { leftItems << "PlayerBottomSeatActive"; } + else if(PlayerBottomSeatActive != QString(currentDir+"NULL") && !QFile(PlayerBottomSeatActive).exists()) { itemPicsLeft << "PlayerBottomSeatActive = "+PlayerBottomSeatActive; } + if(PlayerBottomSeatInactive == "") { leftItems << "PlayerBottomSeatInactive"; } + else if(PlayerBottomSeatInactive != QString(currentDir+"NULL") && !QFile(PlayerBottomSeatInactive).exists()) { itemPicsLeft << "PlayerBottomSeatInactive = "+PlayerBottomSeatInactive; } + if(Table == "") { leftItems << "Table"; } + else if(Table != QString(currentDir+"NULL") && !QFile(Table).exists()) { itemPicsLeft << "Table = "+Table; } + if(HandRanking == "") { leftItems << "HandRanking"; } + else if(HandRanking != QString(currentDir+"NULL") && !QFile(HandRanking).exists()) { itemPicsLeft << "HandRanking = "+HandRanking; } + if(ToolBoxBackground == "") { leftItems << "ToolBoxBackground"; } + else if(ToolBoxBackground != QString(currentDir+"NULL") && !QFile(ToolBoxBackground).exists()) { itemPicsLeft << "ToolBoxBackground = "+ToolBoxBackground; } + + //I18N ACTION STRINGS + if(ActionAllInI18NString == "") { leftItems << "ActionAllInI18NString"; } + if(ActionRaiseI18NString == "") { leftItems << "ActionRaiseI18NString"; } + if(ActionBetI18NString == "") { leftItems << "ActionBetI18NString"; } + if(ActionCallI18NString == "") { leftItems << "ActionCallI18NString"; } + if(ActionCheckI18NString == "") { leftItems << "ActionCheckI18NString"; } + if(ActionFoldI18NString == "") { leftItems << "ActionFoldI18NString"; } + // COLORS if(FKeyIndicatorColor == "") { leftItems << "FKeyIndicatorColor"; } if(ChanceLabelPossibleColor == "") { leftItems << "ChanceLabelPossibleColor"; } @@ -481,21 +578,58 @@ void GameTableStyleReader::setAwayRadioButtonsStyle(QRadioButton *rb) QString GameTableStyleReader::getActionPic(int action) { + QString myAppDataPath = QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str()); + // 1 = fold, 2 = check, 3 = call, 4 = bet, 5 = raise, 6 = allin, 7 = winner switch(action) { - case 1: { return ActionFoldI18N; } + case 1: { + if(myConfig->readConfigInt("DontTranslateInternationalPokerStringsFromStyle") || ActionFoldI18NPic.endsWith("NULL")) + return myAppDataPath+"gfx/gui/misc/actionpics/action_fold.png"; + else + return ActionFoldI18NPic; + } break; - case 2: { return ActionCheckI18N; } + case 2: { + if(myConfig->readConfigInt("DontTranslateInternationalPokerStringsFromStyle") || ActionCheckI18NPic.endsWith("NULL")) + return myAppDataPath+"gfx/gui/misc/actionpics/action_check.png"; + else + return ActionCheckI18NPic; + } break; - case 3: { return ActionCallI18N; } + case 3: { + if(myConfig->readConfigInt("DontTranslateInternationalPokerStringsFromStyle") || ActionCallI18NPic.endsWith("NULL")) + return myAppDataPath+"gfx/gui/misc/actionpics/action_call.png"; + else + return ActionCallI18NPic; + } break; - case 4: { return ActionBetI18N; } + case 4: { + if(myConfig->readConfigInt("DontTranslateInternationalPokerStringsFromStyle") || ActionBetI18NPic.endsWith("NULL")) + return myAppDataPath+"gfx/gui/misc/actionpics/action_bet.png"; + else + return ActionBetI18NPic; + } break; - case 5: { return ActionRaiseI18N; } + case 5: { + if(myConfig->readConfigInt("DontTranslateInternationalPokerStringsFromStyle") || ActionRaiseI18NPic.endsWith("NULL")) + return myAppDataPath+"gfx/gui/misc/actionpics/action_raise.png"; + else + return ActionRaiseI18NPic; + } break; - case 6: { return ActionAllInI18N; } + case 6: { + if(myConfig->readConfigInt("DontTranslateInternationalPokerStringsFromStyle") || ActionAllInI18NPic.endsWith("NULL")) + return myAppDataPath+"gfx/gui/misc/actionpics/action_allin.png"; + else + return ActionAllInI18NPic; + } break; - case 7: { return ActionWinnerI18N; } + case 7: { + if(myConfig->readConfigInt("DontTranslateInternationalPokerStringsFromStyle") || ActionWinnerI18NPic.endsWith("NULL")) + return myAppDataPath+"gfx/gui/misc/actionpics/action_winner.png"; + else + return ActionWinnerI18NPic; + } break; default: return QString(""); } diff --git a/src/gui/qt/styles/gametablestylereader.h b/src/gui/qt/styles/gametablestylereader.h index 81b42c1b..c5c7d888 100644 --- a/src/gui/qt/styles/gametablestylereader.h +++ b/src/gui/qt/styles/gametablestylereader.h @@ -100,6 +100,13 @@ public: void setButtonsStyle(MyActionButton*, MyActionButton*, MyActionButton*, MyActionButton*, int); void setAwayRadioButtonsStyle(QRadioButton*); + QString getActionAllInI18NString() const { return ActionAllInI18NString; } + QString getActionRaiseI18NString() const { return ActionRaiseI18NString; } + QString getActionBetI18NString() const { return ActionBetI18NString; } + QString getActionCallI18NString() const { return ActionCallI18NString; } + QString getActionCheckI18NString() const { return ActionCheckI18NString; } + QString getActionFoldI18NString() const { return ActionFoldI18NString; } + private: //style values // INFOS @@ -115,13 +122,13 @@ private: QString MaximumWindowHeight; // PICS QString Preview; - QString ActionAllInI18N; - QString ActionRaiseI18N; - QString ActionBetI18N; - QString ActionCallI18N; - QString ActionCheckI18N; - QString ActionFoldI18N; - QString ActionWinnerI18N; + QString ActionAllInI18NPic; + QString ActionRaiseI18NPic; + QString ActionBetI18NPic; + QString ActionCallI18NPic; + QString ActionCheckI18NPic; + QString ActionFoldI18NPic; + QString ActionWinnerI18NPic; QString BigBlindPuck; QString SmallBlindPuck; QString DealerPuck; @@ -157,6 +164,15 @@ private: QString Table; QString HandRanking; QString ToolBoxBackground; + +// I18N ACTION STRINGS + QString ActionAllInI18NString; + QString ActionRaiseI18NString; + QString ActionBetI18NString; + QString ActionCallI18NString; + QString ActionCheckI18NString; + QString ActionFoldI18NString; + // COLORS QString FKeyIndicatorColor; QString ChanceLabelPossibleColor;