adds activePlayerList and runningPlayerList (XXVII)
This commit is contained in:
@@ -1173,10 +1173,10 @@ void mainWindowImpl::refreshSet() {
|
|||||||
|
|
||||||
HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand();
|
HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand();
|
||||||
|
|
||||||
PlayerListIterator it;
|
PlayerListConstIterator it_c;
|
||||||
for (it=currentHand->getSeatsList()->begin(); it!=currentHand->getSeatsList()->end(); it++) {
|
for (it_c=currentHand->getSeatsList()->begin(); it_c!=currentHand->getSeatsList()->end(); it_c++) {
|
||||||
if( (*it)->getMySet() == 0 ) setLabelArray[ (*it)->getMyID() ]->setText("");
|
if( (*it_c)->getMySet() == 0 ) setLabelArray[ (*it_c)->getMyID() ]->setText("");
|
||||||
else setLabelArray[(*it)->getMyID()]->setText("Set: "+QString::number( (*it)->getMySet(),10)+" $");
|
else setLabelArray[(*it_c)->getMyID()]->setText("Set: "+QString::number( (*it_c)->getMySet(),10)+" $");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1192,66 +1192,127 @@ void mainWindowImpl::refreshButton() {
|
|||||||
int i;
|
int i;
|
||||||
int k;
|
int k;
|
||||||
//Aktive Spieler zählen
|
//Aktive Spieler zählen
|
||||||
int activePlayersCounter = 0;
|
// int activePlayersCounter = 0;
|
||||||
for (k=0; k<MAX_NUMBER_OF_PLAYERS; k++) {
|
// for (k=0; k<MAX_NUMBER_OF_PLAYERS; k++) {
|
||||||
if (mySession->getCurrentGame()->getCurrentHand()->getPlayerArray()[k]->getMyActiveStatus() == 1) activePlayersCounter++;
|
// if (mySession->getCurrentGame()->getCurrentHand()->getPlayerArray()[k]->getMyActiveStatus() == 1) activePlayersCounter++;
|
||||||
}
|
// }
|
||||||
|
|
||||||
HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand();
|
HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand();
|
||||||
|
|
||||||
for (i=0; i<MAX_NUMBER_OF_PLAYERS; i++) {
|
PlayerListConstIterator it_c;
|
||||||
if(currentHand->getPlayerArray()[i]->getMyActiveStatus()) {
|
|
||||||
if(activePlayersCounter > 2) {
|
|
||||||
switch (currentHand->getPlayerArray()[i]->getMyButton()) {
|
|
||||||
|
|
||||||
case 1 : buttonLabelArray[i]->setPixmap(dealerButton);
|
// for (i=0; i<MAX_NUMBER_OF_PLAYERS; i++) {
|
||||||
break;
|
// if(currentHand->getPlayerArray()[i]->getMyActiveStatus()) {
|
||||||
case 2 : {
|
// if(activePlayersCounter > 2) {
|
||||||
if ( myConfig->readConfigInt("ShowBlindButtons")) buttonLabelArray[i]->setPixmap(smallblindButton);
|
// switch (currentHand->getPlayerArray()[i]->getMyButton()) {
|
||||||
else { buttonLabelArray[i]->setPixmap(onePix); }
|
//
|
||||||
|
// case 1 : buttonLabelArray[i]->setPixmap(dealerButton);
|
||||||
|
// break;
|
||||||
|
// case 2 : {
|
||||||
|
// if ( myConfig->readConfigInt("ShowBlindButtons")) buttonLabelArray[i]->setPixmap(smallblindButton);
|
||||||
|
// else { buttonLabelArray[i]->setPixmap(onePix); }
|
||||||
|
// }
|
||||||
|
// break;
|
||||||
|
// case 3 : {
|
||||||
|
// if (myConfig->readConfigInt("ShowBlindButtons")) buttonLabelArray[i]->setPixmap(bigblindButton);
|
||||||
|
// else { buttonLabelArray[i]->setPixmap(onePix); }
|
||||||
|
// }
|
||||||
|
// break;
|
||||||
|
// default: buttonLabelArray[i]->setPixmap(onePix);
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// else {
|
||||||
|
// switch (currentHand->getPlayerArray()[i]->getMyButton()) {
|
||||||
|
//
|
||||||
|
// case 2 : buttonLabelArray[i]->setPixmap(dealerButton);
|
||||||
|
// break;
|
||||||
|
// case 3 : {
|
||||||
|
// if (myConfig->readConfigInt("ShowBlindButtons")) buttonLabelArray[i]->setPixmap(bigblindButton);
|
||||||
|
// else { buttonLabelArray[i]->setPixmap(onePix); }
|
||||||
|
// }
|
||||||
|
// break;
|
||||||
|
// default: buttonLabelArray[i]->setPixmap(onePix);
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// else { buttonLabelArray[i]->setPixmap(onePix); }
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
for (it_c=currentHand->getSeatsList()->begin(); it_c!=currentHand->getSeatsList()->end(); it_c++) {
|
||||||
|
if( (*it_c)->getMyActiveStatus() ) {
|
||||||
|
if( currentHand->getActivePlayerList()->size() > 2 ) {
|
||||||
|
switch ( (*it_c)->getMyButton() ) {
|
||||||
|
|
||||||
|
case 1 : buttonLabelArray[i]->setPixmap(dealerButton);
|
||||||
|
break;
|
||||||
|
case 2 : {
|
||||||
|
if ( myConfig->readConfigInt("ShowBlindButtons")) buttonLabelArray[(*it_c)->getMyID()]->setPixmap(smallblindButton);
|
||||||
|
else { buttonLabelArray[(*it_c)->getMyID()]->setPixmap(onePix); }
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 3 : {
|
||||||
|
if (myConfig->readConfigInt("ShowBlindButtons")) buttonLabelArray[(*it_c)->getMyID()]->setPixmap(bigblindButton);
|
||||||
|
else { buttonLabelArray[(*it_c)->getMyID()]->setPixmap(onePix); }
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3 : {
|
default: buttonLabelArray[(*it_c)->getMyID()]->setPixmap(onePix);
|
||||||
if (myConfig->readConfigInt("ShowBlindButtons")) buttonLabelArray[i]->setPixmap(bigblindButton);
|
|
||||||
else { buttonLabelArray[i]->setPixmap(onePix); }
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default: buttonLabelArray[i]->setPixmap(onePix);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
switch (currentHand->getPlayerArray()[i]->getMyButton()) {
|
switch ((*it_c)->getMyButton()) {
|
||||||
|
|
||||||
case 2 : buttonLabelArray[i]->setPixmap(dealerButton);
|
case 2 : buttonLabelArray[i]->setPixmap(dealerButton);
|
||||||
break;
|
break;
|
||||||
case 3 : {
|
case 3 : {
|
||||||
if (myConfig->readConfigInt("ShowBlindButtons")) buttonLabelArray[i]->setPixmap(bigblindButton);
|
if (myConfig->readConfigInt("ShowBlindButtons")) buttonLabelArray[(*it_c)->getMyID()]->setPixmap(bigblindButton);
|
||||||
else { buttonLabelArray[i]->setPixmap(onePix); }
|
else { buttonLabelArray[(*it_c)->getMyID()]->setPixmap(onePix); }
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default: buttonLabelArray[i]->setPixmap(onePix);
|
default: buttonLabelArray[(*it_c)->getMyID()]->setPixmap(onePix);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { buttonLabelArray[i]->setPixmap(onePix); }
|
else { buttonLabelArray[(*it_c)->getMyID()]->setPixmap(onePix); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void mainWindowImpl::refreshPlayerName() {
|
void mainWindowImpl::refreshPlayerName() {
|
||||||
|
|
||||||
int i;
|
// int i;
|
||||||
for (i=0; i<MAX_NUMBER_OF_PLAYERS; i++) {
|
// for (i=0; i<MAX_NUMBER_OF_PLAYERS; i++) {
|
||||||
if(mySession->getCurrentGame()->getCurrentHand()->getPlayerArray()[i]->getMyActiveStatus()) {
|
// if(mySession->getCurrentGame()->getCurrentHand()->getPlayerArray()[i]->getMyActiveStatus()) {
|
||||||
playerNameLabelArray[i]->setText(QString::fromUtf8(mySession->getCurrentGame()->getCurrentHand()->getPlayerArray()[i]->getMyName().c_str()));
|
// playerNameLabelArray[i]->setText(QString::fromUtf8(mySession->getCurrentGame()->getCurrentHand()->getPlayerArray()[i]->getMyName().c_str()));
|
||||||
|
//
|
||||||
|
// } else {
|
||||||
|
// playerNameLabelArray[i]->setText("");
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
|
||||||
|
HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand();
|
||||||
|
|
||||||
|
PlayerListConstIterator it_c;
|
||||||
|
for (it_c=currentHand->getSeatsList()->begin(); it_c!=currentHand->getSeatsList()->end(); it_c++) {
|
||||||
|
if((*it_c)->getMyActiveStatus()) {
|
||||||
|
playerNameLabelArray[(*it_c)->getMyID()]->setText(QString::fromUtf8((*it_c)->getMyName().c_str()));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
playerNameLabelArray[i]->setText("");
|
playerNameLabelArray[(*it_c)->getMyID()]->setText("");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void mainWindowImpl::refreshPlayerAvatar() {
|
void mainWindowImpl::refreshPlayerAvatar() {
|
||||||
@@ -1261,30 +1322,49 @@ void mainWindowImpl::refreshPlayerAvatar() {
|
|||||||
|
|
||||||
HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand();
|
HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand();
|
||||||
|
|
||||||
for (i=0; i<MAX_NUMBER_OF_PLAYERS; i++) {
|
// for (i=0; i<MAX_NUMBER_OF_PLAYERS; i++) {
|
||||||
if(currentHand->getPlayerArray()[i]->getMyActiveStatus()) {
|
// if(currentHand->getPlayerArray()[i]->getMyActiveStatus()) {
|
||||||
|
//
|
||||||
|
// if(!i) {
|
||||||
|
// if(currentHand->getPlayerArray()[0]->getMyAvatar() == "" || !QFile::QFile(QString::fromUtf8(currentHand->getPlayerArray()[0]->getMyAvatar().c_str())).exists()) {
|
||||||
|
// playerAvatarLabelArray[0]->setPixmap(QPixmap(myAppDataPath +"gfx/gui/table/default/genereticAvatar.png"));
|
||||||
|
// }
|
||||||
|
// else {
|
||||||
|
// playerAvatarLabelArray[0]->setPixmap(QString::fromUtf8(currentHand->getPlayerArray()[0]->getMyAvatar().c_str()));
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// else {
|
||||||
|
// if(currentHand->getPlayerArray()[i]->getMyAvatar() == "" || !QFile::QFile(QString::fromUtf8(currentHand->getPlayerArray()[i]->getMyAvatar().c_str())).exists()) {
|
||||||
|
// playerAvatarLabelArray[i]->setPixmap(QPixmap(myAppDataPath +"gfx/gui/table/default/genereticAvatar.png"));
|
||||||
|
// }
|
||||||
|
// else {
|
||||||
|
// playerAvatarLabelArray[i]->setPixmap(QString::fromUtf8(currentHand->getPlayerArray()[i]->getMyAvatar().c_str()));
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// else {
|
||||||
|
// playerAvatarLabelArray[i]->setPixmap(onePix);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
if(!i) {
|
|
||||||
if(currentHand->getPlayerArray()[0]->getMyAvatar() == "" || !QFile::QFile(QString::fromUtf8(currentHand->getPlayerArray()[0]->getMyAvatar().c_str())).exists()) {
|
PlayerListConstIterator it_c;
|
||||||
playerAvatarLabelArray[0]->setPixmap(QPixmap(myAppDataPath +"gfx/gui/table/default/genereticAvatar.png"));
|
for (it_c=currentHand->getSeatsList()->begin(); it_c!=currentHand->getSeatsList()->end(); it_c++) {
|
||||||
}
|
if((*it_c)->getMyActiveStatus()) {
|
||||||
else {
|
|
||||||
playerAvatarLabelArray[0]->setPixmap(QString::fromUtf8(currentHand->getPlayerArray()[0]->getMyAvatar().c_str()));
|
if((*it_c)->getMyAvatar() == "" || !QFile::QFile(QString::fromUtf8((*it_c)->getMyAvatar().c_str())).exists()) {
|
||||||
}
|
playerAvatarLabelArray[(*it_c)->getMyID()]->setPixmap(QPixmap(myAppDataPath +"gfx/gui/table/default/genereticAvatar.png"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(currentHand->getPlayerArray()[i]->getMyAvatar() == "" || !QFile::QFile(QString::fromUtf8(currentHand->getPlayerArray()[i]->getMyAvatar().c_str())).exists()) {
|
playerAvatarLabelArray[(*it_c)->getMyID()]->setPixmap(QString::fromUtf8((*it_c)->getMyAvatar().c_str()));
|
||||||
playerAvatarLabelArray[i]->setPixmap(QPixmap(myAppDataPath +"gfx/gui/table/default/genereticAvatar.png"));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
playerAvatarLabelArray[i]->setPixmap(QString::fromUtf8(currentHand->getPlayerArray()[i]->getMyAvatar().c_str()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
playerAvatarLabelArray[i]->setPixmap(onePix);
|
playerAvatarLabelArray[(*it_c)->getMyID()]->setPixmap(onePix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void mainWindowImpl::refreshAction(int playerID, int playerAction) {
|
void mainWindowImpl::refreshAction(int playerID, int playerAction) {
|
||||||
|
|||||||
Reference in New Issue
Block a user