Partially unified handling of pregame and in-game chats

This commit is contained in:
Ivan Savenko committed 2024-03-27 13:10:55 +02:00
1 parent 0b89d3804c
commit 4ed961fb96
14 files changed
+248 -72

No files matched your search

+2 -7
View File
@@ -24,6 +24,7 @@
#include "globalLobby/GlobalLobbyClient.h"
#include "CServerHandler.h"
#include "GameChatHandler.h"
#include "CGameInfo.h"
#include "Client.h"
#include "gui/CGuiHandler.h"
@@ -98,13 +99,7 @@ void ApplyOnLobbyScreenNetPackVisitor::visitLobbyClientDisconnected(LobbyClientD
void ApplyOnLobbyScreenNetPackVisitor::visitLobbyChatMessage(LobbyChatMessage & pack)
{
if(lobby && lobby->card)
{
lobby->card->chat->addNewMessage(pack.playerName + ": " + pack.message);
lobby->card->setChat(true);
if(lobby->buttonChat)
lobby->buttonChat->setTextOverlay(CGI->generaltexth->allTexts[531], FONT_SMALL, Colors::WHITE);
}
handler.getGameChat().onNewLobbyMessageReceived(pack.playerName, pack.message);
}
void ApplyOnLobbyScreenNetPackVisitor::visitLobbyGuiAction(LobbyGuiAction & pack)