QTfrontend/game.cpp
branchflibqtfrontend
changeset 8282 1f81bcce3ee6
parent 8280 734b069a418e
child 8304 620560c89284
--- a/QTfrontend/game.cpp	Fri Dec 14 00:12:00 2012 +0400
+++ b/QTfrontend/game.cpp	Sun Dec 16 12:05:32 2012 +0400
@@ -435,6 +435,11 @@
 void HWGame::onChat(void* context, const char *msg, bool teamchat)
 {
     HWGame * game = (HWGame *) context;
+
+    if(teamchat)
+        emit game->SendTeamMessage(QString::fromUtf8(msg));
+    else
+        emit game->SendChat(QString::fromUtf8(msg));
 }
 
 void HWGame::onConnect(void* context)
@@ -477,6 +482,8 @@
 void HWGame::onErrorMessage(void* context, const char *msg)
 {
     HWGame * game = (HWGame *) context;
+
+    emit game->ErrorMessage(QString("Last two engine messages:\n%1").arg(QString::fromUtf8(msg)));
 }
 
 void HWGame::onGameRecorded(void *context, const uint8_t *record, size_t size, bool isSavegame)