Signals/callbacks when spectators join or leave.
This commit is contained in:
@@ -373,6 +373,22 @@ void GuiWrapper::SignalNetClientPlayerLeft(unsigned playerId, const string &play
|
||||
if (!playerName.empty() && playerName[0] != '#' && myW->isVisible())
|
||||
myGuiLog->signalLogPlayerLeftMsg(tmpName, removeReason == NTF_NET_REMOVED_KICKED);
|
||||
}
|
||||
void GuiWrapper::SignalNetClientSpectatorJoined(unsigned playerId, const string &playerName)
|
||||
{
|
||||
myStartWindow->signalNetClientSpectatorJoined(playerId, QString::fromUtf8(playerName.c_str()));
|
||||
if (!playerName.empty() && playerName[0] != '#' && myW->isVisible()) {
|
||||
QString tmpName(QString::fromUtf8(playerName.c_str()));
|
||||
myGuiLog->signalLogSpectatorJoinedMsg(tmpName);
|
||||
}
|
||||
}
|
||||
void GuiWrapper::SignalNetClientSpectatorLeft(unsigned playerId, const string &playerName, int removeReason)
|
||||
{
|
||||
QString tmpName(QString::fromUtf8(playerName.c_str()));
|
||||
myStartWindow->signalNetClientSpectatorLeft(playerId, tmpName);
|
||||
myW->signalNetClientSpectatorLeft(playerId);
|
||||
if (!playerName.empty() && playerName[0] != '#' && myW->isVisible())
|
||||
myGuiLog->signalLogSpectatorLeftMsg(tmpName, removeReason == NTF_NET_REMOVED_KICKED);
|
||||
}
|
||||
void GuiWrapper::SignalNetClientNewGameAdmin(unsigned playerId, const string &playerName)
|
||||
{
|
||||
|
||||
@@ -405,6 +421,14 @@ void GuiWrapper::SignalNetClientGameListPlayerLeft(unsigned gameId, unsigned pla
|
||||
{
|
||||
myStartWindow->signalNetClientGameListPlayerLeft(gameId, playerId);
|
||||
}
|
||||
void GuiWrapper::SignalNetClientGameListSpectatorJoined(unsigned gameId, unsigned playerId)
|
||||
{
|
||||
myStartWindow->signalNetClientGameListSpectatorJoined(gameId, playerId);
|
||||
}
|
||||
void GuiWrapper::SignalNetClientGameListSpectatorLeft(unsigned gameId, unsigned playerId)
|
||||
{
|
||||
myStartWindow->signalNetClientGameListSpectatorLeft(gameId, playerId);
|
||||
}
|
||||
void GuiWrapper::SignalNetClientGameStart(boost::shared_ptr<Game> game)
|
||||
{
|
||||
myStartWindow->signalNetClientGameStart(game);
|
||||
|
||||
Reference in New Issue
Block a user