--- a/QTfrontend/ui/widget/teamselect.cpp Wed Nov 28 00:27:30 2012 +0400
+++ b/QTfrontend/ui/widget/teamselect.cpp Wed Nov 28 11:57:39 2012 +0100
@@ -59,6 +59,7 @@
this, SLOT(changeTeamStatus(HWTeam)));
}
}
+
emit setEnabledGameStart(curPlayingTeams.size()>1);
}
@@ -168,6 +169,12 @@
m_curNotPlayingTeams.push_back(*itPlay);
emit teamNotPlaying(*itPlay);
curPlayingTeams.erase(itPlay);
+
+ // Show team notice if less than two teams.
+ if (curPlayingTeams.size() < 2)
+ {
+ numTeamNotice->show();
+ }
}
else
{
@@ -179,6 +186,12 @@
curPlayingTeams.push_back(*itDontPlay);
if(!m_acceptOuter) emit teamWillPlay(*itDontPlay);
m_curNotPlayingTeams.erase(itDontPlay);
+
+ // Hide team notice if at least two teams.
+ if (curPlayingTeams.size() >= 2)
+ {
+ numTeamNotice->hide();
+ }
}
FrameTeams* pRemoveTeams;
@@ -254,6 +267,10 @@
framePlaying = new FrameTeams();
frameDontPlaying = new FrameTeams();
+ // Add notice about number of required teams.
+ numTeamNotice = new QLabel("Two teams are required to play!");
+ mainLayout.addWidget((QWidget*)numTeamNotice);
+
QPalette p;
p.setColor(QPalette::Window, QColor(0x00, 0x00, 0x00));
addScrArea(framePlaying, p.color(QPalette::Window).light(105), 250);