This commit is contained in:
doitux
2008-12-08 21:50:43 +00:00
parent d8c36d03eb
commit 9d830eaba4
3 changed files with 10 additions and 7 deletions
+5 -5
View File
@@ -3130,13 +3130,13 @@ void gameTableImpl::startVoteOnKick(unsigned playerId, unsigned voteStarterPlaye
refreshVotesMonitor(1, numVotesNeededToKick);
PlayerInfo info(myStartWindow->getSession()->getClientPlayerInfo(voteStarterPlayerId));
label_voteStarterNick->setText(QString::fromUtf8(info.playerName.c_str()));
label_voteStarterNick->setText("<b>"+QString::fromUtf8(info.playerName.c_str())+"</b>");
startVoteOnKickTimeout();
int i;
for (i=0; i<MAX_NUMBER_OF_PLAYERS; i++ ) {
playerAvatarLabelArray[i]->setVoteOnKickContextMenuEnabled(FALSE);
playerAvatarLabelArray[i]->setVoteRunning(TRUE);
}
}
@@ -3164,7 +3164,7 @@ void gameTableImpl::endVoteOnKick()
int i;
for (i=0; i<MAX_NUMBER_OF_PLAYERS; i++ ) {
playerAvatarLabelArray[i]->setVoteOnKickContextMenuEnabled(TRUE);
playerAvatarLabelArray[i]->setVoteRunning(FALSE);
}
}
@@ -3209,10 +3209,10 @@ void gameTableImpl::refreshVotesMonitor(int currentVotes, int numVotesNeededToKi
if((*myStartWindow->getSession()->getCurrentGame()->getSeatsList()->begin())->getMyUniqueID() != playerAboutToBeKickedId) {
PlayerInfo info(myStartWindow->getSession()->getClientPlayerInfo(playerAboutToBeKickedId));
label_votesMonitor->setText(tr("Player <b>%1</b> has %2 %3 <br>against him. %4 votes needed to kick.").arg(QString::fromUtf8(info.playerName.c_str())).arg(currentVotes).arg(currentVotesString).arg(numVotesNeededToKick));
label_votesMonitor->setText(tr("Player <b>%1</b> has <b>%2</b> %3<br>against him. <b>%4</b> votes needed to kick.").arg(QString::fromUtf8(info.playerName.c_str())).arg(currentVotes).arg(currentVotesString).arg(numVotesNeededToKick));
}
else {
label_votesMonitor->setText(tr("You have %1 %2 against you. %3 votes needed to kick.").arg(currentVotes).arg(currentVotesString).arg(numVotesNeededToKick));
label_votesMonitor->setText(tr("You have <b>%1</b> %2 against you.<br><b>%3</b> votes needed to kick.").arg(currentVotes).arg(currentVotesString).arg(numVotesNeededToKick));
}
}
+1 -1
View File
@@ -44,7 +44,7 @@ void MyAvatarLabel::contextMenuEvent ( QContextMenuEvent *event ) {
for (it_c=currentGame->getSeatsList()->begin(); it_c!=currentGame->getSeatsList()->end(); it_c++) {
if((*it_c)->getMyActiveStatus()) activePlayerCounter++;
}
if(activePlayerCounter > 2) setVoteOnKickContextMenuEnabled(TRUE);
if(activePlayerCounter > 2 && !voteRunning ) setVoteOnKickContextMenuEnabled(TRUE);
else setVoteOnKickContextMenuEnabled(FALSE);
int i=0;
+4 -1
View File
@@ -37,6 +37,8 @@ public slots:
void setEnabledContextMenu(bool);
void setVoteOnKickContextMenuEnabled(bool);
void setVoteRunning ( bool theValue ) { voteRunning = theValue; }
private:
gameTableImpl *myW;
@@ -44,7 +46,8 @@ private:
QAction *action_VoteForKick;
int myId;
bool myContextMenuEnabled;
bool myContextMenuEnabled;
bool voteRunning;
};
#endif