starts human player input filed redesign - PART VII (firtst steps for network game)
This commit is contained in:
@@ -95,6 +95,7 @@ void ServerGuiWrapper::nextRoundCleanGui() {}
|
||||
|
||||
void ServerGuiWrapper::meInAction() {}
|
||||
void ServerGuiWrapper::disableMyButtons() {}
|
||||
void ServerGuiWrapper::updateMyButtonsState() {}
|
||||
void ServerGuiWrapper::startTimeoutAnimation(int /*playerId*/, int /*timeoutSec*/) {}
|
||||
void ServerGuiWrapper::stopTimeoutAnimation(int /*playerId*/) {}
|
||||
|
||||
|
||||
@@ -78,6 +78,7 @@ public:
|
||||
void nextRoundCleanGui();
|
||||
|
||||
void meInAction();
|
||||
void updateMyButtonsState();
|
||||
void disableMyButtons();
|
||||
void startTimeoutAnimation(int playerId, int timeoutSec);
|
||||
void stopTimeoutAnimation(int playerId);
|
||||
|
||||
@@ -88,6 +88,7 @@ public:
|
||||
// virtual void userWidgetsBackgroudColor() const=0;
|
||||
// virtual void timerBlockerFalse() const=0;
|
||||
virtual void meInAction()=0;
|
||||
virtual void updateMyButtonsState()=0;
|
||||
virtual void disableMyButtons()=0;
|
||||
virtual void startTimeoutAnimation(int playerId, int timeoutSec) =0;
|
||||
virtual void stopTimeoutAnimation(int playerId) =0;
|
||||
|
||||
@@ -95,6 +95,7 @@ void GuiWrapper::flipHolecardsAllIn() { myW->signalFlipHolecardsAllIn(); }
|
||||
void GuiWrapper::nextRoundCleanGui() { myW->signalNextRoundCleanGui(); }
|
||||
|
||||
void GuiWrapper::meInAction() { myW->signalMeInAction(); }
|
||||
void GuiWrapper::updateMyButtonsState() { myW->updateMyButtonsState(); }
|
||||
void GuiWrapper::disableMyButtons() { myW->signalDisableMyButtons(); }
|
||||
void GuiWrapper::startTimeoutAnimation(int playerId, int timeoutSec) { myW->signalStartTimeoutAnimation(playerId, timeoutSec); }
|
||||
void GuiWrapper::stopTimeoutAnimation(int playerId) { myW->signalStopTimeoutAnimation(playerId); }
|
||||
|
||||
@@ -86,6 +86,7 @@ public:
|
||||
|
||||
void meInAction();
|
||||
void disableMyButtons();
|
||||
void updateMyButtonsState();
|
||||
void startTimeoutAnimation(int playerId, int timeoutSec);
|
||||
void stopTimeoutAnimation(int playerId);
|
||||
|
||||
|
||||
@@ -2389,19 +2389,13 @@ void mainWindowImpl::nextPlayerAnimation() {
|
||||
if((*it_c)->getMyID() == currentHand->getLastPlayersTurn()) break;
|
||||
}
|
||||
|
||||
refreshAction(currentHand->getLastPlayersTurn(), (*it_c)->getMyAction());
|
||||
if(currentHand->getLastPlayersTurn() != -1) {
|
||||
refreshAction(currentHand->getLastPlayersTurn(), (*it_c)->getMyAction());
|
||||
}
|
||||
refreshCash();
|
||||
|
||||
//refresh actions for human player
|
||||
|
||||
if(currentHand->getLastPlayersTurn() == 0) {
|
||||
myButtonsCheckable(FALSE);
|
||||
clearMyButtons();
|
||||
}
|
||||
else {
|
||||
myButtonsCheckable(TRUE);
|
||||
provideMyActions();
|
||||
}
|
||||
updateMyButtonsState();
|
||||
|
||||
nextPlayerAnimationTimer->start(nextPlayerSpeed1);
|
||||
}
|
||||
@@ -3532,6 +3526,20 @@ void mainWindowImpl::mouseOverFlipCards(bool front) {
|
||||
}
|
||||
}
|
||||
|
||||
void mainWindowImpl::updateMyButtonsState() {
|
||||
|
||||
HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand();
|
||||
|
||||
if(currentHand->getLastPlayersTurn() == 0) {
|
||||
myButtonsCheckable(FALSE);
|
||||
clearMyButtons();
|
||||
}
|
||||
else {
|
||||
myButtonsCheckable(TRUE);
|
||||
provideMyActions();
|
||||
}
|
||||
}
|
||||
|
||||
void mainWindowImpl::uncheckMyButtons() {
|
||||
|
||||
pushButton_BetRaise->setChecked(FALSE);
|
||||
|
||||
@@ -310,6 +310,7 @@ public slots:
|
||||
|
||||
void mouseOverFlipCards(bool front);
|
||||
|
||||
void updateMyButtonsState();
|
||||
void uncheckMyButtons();
|
||||
void resetMyButtonsCheckStateMemory();
|
||||
void clearMyButtons();
|
||||
|
||||
Reference in New Issue
Block a user