This commit is contained in:
doitux
2007-11-17 23:48:14 +00:00
parent 189e2d5d0e
commit b8b9cac9da
+50 -27
View File
@@ -1883,7 +1883,25 @@ void mainWindowImpl::provideMyActions(int mode) {
pushButton_CallCheck->setText(pushButtonCallCheckString); pushButton_CallCheck->setText(pushButtonCallCheckString);
pushButton_AllIn->setText("All-In"); pushButton_AllIn->setText("All-In");
myBetRaise(); // myBetRaise();
if(pushButton_BetRaise->text().startsWith("Raise")) {
horizontalSlider_bet->setMinimum(currentHand->getCurrentBeRo()->getHighestSet() - currentHand->getSeatsList()->front()->getMySet() + currentHand->getCurrentBeRo()->getMinimumRaise());
horizontalSlider_bet->setMaximum(currentHand->getSeatsList()->front()->getMyCash());
horizontalSlider_bet->setSingleStep(10);
myActionIsRaise = 1;
}
else if(pushButton_BetRaise->text().startsWith("Bet")) {
horizontalSlider_bet->setMinimum(currentHand->getSmallBlind()*2);
horizontalSlider_bet->setMaximum(currentHand->getSeatsList()->front()->getMyCash());
horizontalSlider_bet->setSingleStep(10);
myActionIsBet = 1;
}
else {}
//if value changed on bet/raise button --> uncheck to prevent unwanted actions //if value changed on bet/raise button --> uncheck to prevent unwanted actions
QString lastBetValueString = lastPushButtonBetRaiseString.section(" ",1 ,1); QString lastBetValueString = lastPushButtonBetRaiseString.section(" ",1 ,1);
@@ -1903,6 +1921,11 @@ void mainWindowImpl::provideMyActions(int mode) {
lineEdit_betValue->selectAll(); lineEdit_betValue->selectAll();
} }
if(mySession->getGameType() == Session::GAME_TYPE_LOCAL) {
lineEdit_betValue->setFocus();
lineEdit_betValue->selectAll();
}
} }
} }
@@ -2002,18 +2025,18 @@ void mainWindowImpl::disableMyButtons() {
void mainWindowImpl::myBetRaise() { void mainWindowImpl::myBetRaise() {
if(pushButton_BetRaise->text().startsWith("Raise")) { // if(pushButton_BetRaise->text().startsWith("Raise")) {
myRaise(); // myRaise();
} // }
else if(pushButton_BetRaise->text().startsWith("Bet")) { // else if(pushButton_BetRaise->text().startsWith("Bet")) {
myBet(); // myBet();
} // }
else {} // else {}
//
if(mySession->getGameType() == Session::GAME_TYPE_LOCAL) { // if(mySession->getGameType() == Session::GAME_TYPE_LOCAL) {
lineEdit_betValue->setFocus(); // lineEdit_betValue->setFocus();
lineEdit_betValue->selectAll(); // lineEdit_betValue->selectAll();
} // }
} }
@@ -2145,24 +2168,24 @@ void mainWindowImpl::myCall(){
void mainWindowImpl::myBet(){ void mainWindowImpl::myBet(){
HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand(); // HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand();
//
horizontalSlider_bet->setMinimum(currentHand->getSmallBlind()*2); // horizontalSlider_bet->setMinimum(currentHand->getSmallBlind()*2);
horizontalSlider_bet->setMaximum(currentHand->getSeatsList()->front()->getMyCash()); // horizontalSlider_bet->setMaximum(currentHand->getSeatsList()->front()->getMyCash());
horizontalSlider_bet->setSingleStep(10); // horizontalSlider_bet->setSingleStep(10);
//
myActionIsBet = 1; // myActionIsBet = 1;
} }
void mainWindowImpl::myRaise(){ void mainWindowImpl::myRaise(){
HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand(); // HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand();
//
horizontalSlider_bet->setMinimum(currentHand->getCurrentBeRo()->getHighestSet() - currentHand->getSeatsList()->front()->getMySet() + currentHand->getCurrentBeRo()->getMinimumRaise()); // horizontalSlider_bet->setMinimum(currentHand->getCurrentBeRo()->getHighestSet() - currentHand->getSeatsList()->front()->getMySet() + currentHand->getCurrentBeRo()->getMinimumRaise());
horizontalSlider_bet->setMaximum(currentHand->getSeatsList()->front()->getMyCash()); // horizontalSlider_bet->setMaximum(currentHand->getSeatsList()->front()->getMyCash());
horizontalSlider_bet->setSingleStep(10); // horizontalSlider_bet->setSingleStep(10);
//
myActionIsRaise = 1; // myActionIsRaise = 1;
} }