add timout warning in ranking game dialog
This commit is contained in:
@@ -147,6 +147,8 @@ void ServerGuiWrapper::SignalNetClientGameChatMsg(const string &playerName, cons
|
||||
void ServerGuiWrapper::SignalNetClientLobbyChatMsg(const string &playerName, const string &msg) { if (myClientcb) myClientcb->SignalNetClientLobbyChatMsg(playerName, msg); }
|
||||
void ServerGuiWrapper::SignalNetClientMsgBox(const string &msg) { if (myClientcb) myClientcb->SignalNetClientMsgBox(msg); }
|
||||
void ServerGuiWrapper::SignalNetClientWaitDialog() { if (myClientcb) myClientcb->SignalNetClientWaitDialog(); }
|
||||
void ServerGuiWrapper::SignalNetClientWarningAutoFoldInRankingGame(unsigned remainingAutoFolds) { if (myClientcb) myClientcb->SignalNetClientWarningAutoFoldInRankingGame(remainingAutoFolds); }
|
||||
|
||||
|
||||
void ServerGuiWrapper::SignalNetServerSuccess(int actionID) { if (myServercb) myServercb->SignalNetServerSuccess(actionID); }
|
||||
void ServerGuiWrapper::SignalNetServerError(int errorID, int osErrorID) { if (myServercb) myServercb->SignalNetServerError(errorID, osErrorID); }
|
||||
|
||||
@@ -120,6 +120,7 @@ public:
|
||||
void SignalNetClientGameChatMsg(const std::string &playerName, const std::string &msg);
|
||||
void SignalNetClientLobbyChatMsg(const std::string &playerName, const std::string &msg);
|
||||
void SignalNetClientWaitDialog();
|
||||
void SignalNetClientWarningAutoFoldInRankingGame(unsigned remainingAutoFolds);
|
||||
|
||||
void SignalNetClientGameListNew(unsigned gameId);
|
||||
void SignalNetClientGameListRemove(unsigned gameId);
|
||||
|
||||
@@ -1552,7 +1552,7 @@ void gameLobbyDialogImpl::showAutoStartTimer()
|
||||
autoStartTimerOverlay->setGeometry(((scrollArea_gameInfos->geometry().width()-190)/2), ((scrollArea_gameInfos->geometry().height()-50)/2), 190, 50);
|
||||
|
||||
QString string(tr("The game will start in<br><b>%1</b> seconds.").arg(6));
|
||||
autoStartTimerOverlay->setText("<span style='font-size:9pt;'>"+string+"</span>");
|
||||
autoStartTimerOverlay->setText("<span style='color:#008B00; font-size:9pt;'>"+string+"</span>");
|
||||
autoStartTimerCounter = 6;
|
||||
autoStartTimer->start(1000);
|
||||
|
||||
@@ -1563,7 +1563,7 @@ void gameLobbyDialogImpl::updateAutoStartTimer()
|
||||
--autoStartTimerCounter;
|
||||
if(autoStartTimerCounter) {
|
||||
QString string(tr("The game will start in<br><b>%1</b> seconds.").arg(autoStartTimerCounter));
|
||||
autoStartTimerOverlay->setText("<span style='font-size:9pt;'>"+string+"</span>");
|
||||
autoStartTimerOverlay->setText("<span style='color:#008B00; font-size:9pt;'>"+string+"</span>");
|
||||
}
|
||||
else {
|
||||
autoStartTimer->stop();
|
||||
|
||||
@@ -508,7 +508,7 @@ gameTableImpl::gameTableImpl(ConfigFile *c, QMainWindow *parent)
|
||||
connect(this, SIGNAL(signalEndVoteOnKick()), this, SLOT(endVoteOnKick()));
|
||||
|
||||
connect(this, SIGNAL(signalNetClientPlayerLeft(unsigned)), this, SLOT(netClientPlayerLeft(unsigned)));
|
||||
|
||||
connect(this, SIGNAL(signalWarningAutoFoldInRankingGame(unsigned)), this, SLOT(showWarningAutoFoldInRankingGame(unsigned)));
|
||||
}
|
||||
|
||||
gameTableImpl::~gameTableImpl() {
|
||||
@@ -3387,3 +3387,13 @@ void gameTableImpl::sendShowMyCardsSignal()
|
||||
pushButton_showMyCards->hide();
|
||||
}
|
||||
}
|
||||
|
||||
void gameTableImpl::showWarningAutoFoldInRankingGame(unsigned remainingAutoFolds)
|
||||
{
|
||||
QMessageBox::warning(this, tr("PokerTH - Warning"),
|
||||
tr("You have triggered a warning level of timeouts in a ranking game.\n"
|
||||
"After %1 additional timeouts the server needs to kick you to provide a better game flow!\n\n"
|
||||
"If you are temporarily away, you can use the \"away\" tools in the tool box on the right."),
|
||||
QMessageBox::Ok);
|
||||
tabWidget_Right->setCurrentIndex(1);
|
||||
}
|
||||
|
||||
@@ -119,14 +119,12 @@ signals:
|
||||
void signalPostRiverShowCards(unsigned playerId);
|
||||
|
||||
void signalFlipHolecardsAllIn();
|
||||
|
||||
void signalNextRoundCleanGui();
|
||||
|
||||
void signalStartVoteOnKick(unsigned playerId, unsigned voteStarterPlayerId, int timeoutSec, int numVotesNeededToKick);
|
||||
void signalChangeVoteOnKickButtonsState(bool showHide);
|
||||
void signalEndVoteOnKick();
|
||||
|
||||
void signalNetClientPlayerLeft(unsigned playerId);
|
||||
void signalWarningAutoFoldInRankingGame(unsigned remainingAutoFolds);
|
||||
|
||||
public slots:
|
||||
|
||||
@@ -309,6 +307,8 @@ public slots:
|
||||
void showShowMyCardsButton();
|
||||
void sendShowMyCardsSignal();
|
||||
|
||||
void showWarningAutoFoldInRankingGame(unsigned);
|
||||
|
||||
private:
|
||||
|
||||
boost::shared_ptr<GuiInterface> myServerGuiInterface;
|
||||
|
||||
@@ -168,6 +168,8 @@ void GuiWrapper::SignalNetClientGameListPlayerLeft(unsigned gameId, unsigned pla
|
||||
void GuiWrapper::SignalNetClientGameStart(boost::shared_ptr<Game> game) { myStartWindow->signalNetClientGameStart(game); }
|
||||
|
||||
void GuiWrapper::SignalNetClientWaitDialog() { myStartWindow->signalShowClientDialog(); }
|
||||
void GuiWrapper::SignalNetClientWarningAutoFoldInRankingGame(unsigned remainingAutoFolds) { myW->signalWarningAutoFoldInRankingGame(remainingAutoFolds); }
|
||||
|
||||
void GuiWrapper::SignalNetClientGameChatMsg(const string &playerName, const string &msg) { myStartWindow->signalNetClientGameChatMsg(QString::fromUtf8(playerName.c_str()), QString::fromUtf8(msg.c_str())); }
|
||||
void GuiWrapper::SignalNetClientLobbyChatMsg(const string &playerName, const string &msg) { myStartWindow->signalNetClientLobbyChatMsg(QString::fromUtf8(playerName.c_str()), QString::fromUtf8(msg.c_str())); }
|
||||
void GuiWrapper::SignalNetClientMsgBox(const string &msg) { myStartWindow->signalNetClientMsgBox(QString::fromUtf8(msg.c_str())); }
|
||||
|
||||
@@ -133,6 +133,8 @@ public:
|
||||
void SignalNetClientLobbyChatMsg(const std::string &playerName, const std::string &msg);
|
||||
void SignalNetClientMsgBox(const std::string &msg);
|
||||
void SignalNetClientWaitDialog();
|
||||
void SignalNetClientWarningAutoFoldInRankingGame(unsigned remainingAutoFolds);
|
||||
|
||||
|
||||
void SignalNetClientGameListNew(unsigned gameId);
|
||||
void SignalNetClientGameListRemove(unsigned gameId);
|
||||
|
||||
@@ -60,6 +60,7 @@ public:
|
||||
virtual void SignalNetClientLobbyChatMsg(const std::string &playerName, const std::string &msg) = 0;
|
||||
virtual void SignalNetClientMsgBox(const std::string &msg) = 0;
|
||||
virtual void SignalNetClientWaitDialog() = 0;
|
||||
virtual void SignalNetClientWarningAutoFoldInRankingGame(unsigned remainingAutoFolds) = 0;
|
||||
|
||||
virtual void SignalNetClientServerListAdd(unsigned serverId) = 0;
|
||||
virtual void SignalNetClientServerListClear() = 0;
|
||||
|
||||
Reference in New Issue
Block a user