show votekick starter nick, disable kick contextmenu for only 2 players
This commit is contained in:
1 parent
0a2512da13
commit
15d934e5b8
10 files changed
+84
-35
No files matched your search
@@ -38,8 +38,15 @@ void MyAvatarLabel::contextMenuEvent ( QContextMenuEvent *event ) {
|
||||
|
||||
|
||||
Game *currentGame = myW->getSession()->getCurrentGame();
|
||||
|
||||
|
||||
PlayerListConstIterator it_c;
|
||||
int activePlayerCounter=0;
|
||||
for (it_c=currentGame->getSeatsList()->begin(); it_c!=currentGame->getSeatsList()->end(); it_c++) {
|
||||
if((*it_c)->getMyActiveStatus()) activePlayerCounter++;
|
||||
}
|
||||
if(activePlayerCounter > 2) setVoteOnKickContextMenuEnabled(TRUE);
|
||||
else setVoteOnKickContextMenuEnabled(FALSE);
|
||||
|
||||
int i=0;
|
||||
for (it_c=currentGame->getSeatsList()->begin(); it_c!=currentGame->getSeatsList()->end(); it_c++) {
|
||||
|
||||
|
||||
Reference in new issue
Block a user