From b8b9cac9da2e557f9e9d150cbfafd92a32b31e53 Mon Sep 17 00:00:00 2001 From: doitux Date: Sat, 17 Nov 2007 23:48:14 +0000 Subject: [PATCH] --- src/gui/qt/mainwindow/mainwindowimpl.cpp | 77 +++++++++++++++--------- 1 file changed, 50 insertions(+), 27 deletions(-) diff --git a/src/gui/qt/mainwindow/mainwindowimpl.cpp b/src/gui/qt/mainwindow/mainwindowimpl.cpp index 1089f5df..21d27104 100755 --- a/src/gui/qt/mainwindow/mainwindowimpl.cpp +++ b/src/gui/qt/mainwindow/mainwindowimpl.cpp @@ -1883,8 +1883,26 @@ void mainWindowImpl::provideMyActions(int mode) { pushButton_CallCheck->setText(pushButtonCallCheckString); 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 QString lastBetValueString = lastPushButtonBetRaiseString.section(" ",1 ,1); int index = lastBetValueString.indexOf("$"); @@ -1903,6 +1921,11 @@ void mainWindowImpl::provideMyActions(int mode) { 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() { - if(pushButton_BetRaise->text().startsWith("Raise")) { - myRaise(); - } - else if(pushButton_BetRaise->text().startsWith("Bet")) { - myBet(); - } - else {} - - if(mySession->getGameType() == Session::GAME_TYPE_LOCAL) { - lineEdit_betValue->setFocus(); - lineEdit_betValue->selectAll(); - } +// if(pushButton_BetRaise->text().startsWith("Raise")) { +// myRaise(); +// } +// else if(pushButton_BetRaise->text().startsWith("Bet")) { +// myBet(); +// } +// else {} +// +// if(mySession->getGameType() == Session::GAME_TYPE_LOCAL) { +// lineEdit_betValue->setFocus(); +// lineEdit_betValue->selectAll(); +// } } @@ -2145,24 +2168,24 @@ void mainWindowImpl::myCall(){ void mainWindowImpl::myBet(){ - HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand(); - - horizontalSlider_bet->setMinimum(currentHand->getSmallBlind()*2); - horizontalSlider_bet->setMaximum(currentHand->getSeatsList()->front()->getMyCash()); - horizontalSlider_bet->setSingleStep(10); - - myActionIsBet = 1; +// HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand(); +// +// horizontalSlider_bet->setMinimum(currentHand->getSmallBlind()*2); +// horizontalSlider_bet->setMaximum(currentHand->getSeatsList()->front()->getMyCash()); +// horizontalSlider_bet->setSingleStep(10); +// +// myActionIsBet = 1; } void mainWindowImpl::myRaise(){ - HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand(); - - 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; +// HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand(); +// +// 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; }