Chat messages are now working.

This commit is contained in:
lotodore
2007-05-25 16:03:12 +00:00
parent d01ecaf885
commit 13a731e041
21 changed files with 761 additions and 337 deletions
+4 -3
View File
@@ -27,7 +27,8 @@ using namespace std;
Chat::Chat(mainWindowImpl* w, ConfigFile *c) : myW(w), myConfig(c)
{
myW->setChat(this);
connect(this, SIGNAL(signalChatMessage(QString, QString)), this, SLOT(receiveMessage(QString, QString)));
}
Chat::~Chat()
@@ -42,9 +43,9 @@ void Chat::sendMessage() {
myW->lineEdit_ChatInput->setText("");
}
void Chat::receiveMessage(std::string message) {
void Chat::receiveMessage(QString playerName, QString message) {
myW->textBrowser_Chat->append(QString::fromUtf8(message.c_str()));
myW->textBrowser_Chat->append(playerName + ": " + message);
checkInvisible();
}