implement spectator display on the table to check if spectators watching the current game (#196)

This commit is contained in:
doitux
2013-09-30 10:23:51 +02:00
parent 4f8028aa0b
commit 972ab5e2ee
8 changed files with 208 additions and 60 deletions
+2
View File
@@ -364,6 +364,7 @@ void GuiWrapper::SignalNetClientPlayerJoined(unsigned playerId, const string &pl
void GuiWrapper::SignalNetClientPlayerChanged(unsigned playerId, const string &newPlayerName)
{
myStartWindow->signalNetClientPlayerChanged(playerId, QString::fromUtf8(newPlayerName.c_str()));
myW->refreshSpectatorsDisplay();
}
void GuiWrapper::SignalNetClientPlayerLeft(unsigned playerId, const string &playerName, int removeReason)
{
@@ -376,6 +377,7 @@ void GuiWrapper::SignalNetClientPlayerLeft(unsigned playerId, const string &play
void GuiWrapper::SignalNetClientSpectatorJoined(unsigned playerId, const string &playerName)
{
myStartWindow->signalNetClientSpectatorJoined(playerId, QString::fromUtf8(playerName.c_str()));
myW->signalNetClientSpectatorJoined(playerId);
if (!playerName.empty() && playerName[0] != '#' && myW->isVisible()) {
QString tmpName(QString::fromUtf8(playerName.c_str()));
myGuiLog->signalLogSpectatorJoinedMsg(tmpName);