This commit is contained in:
doitux
2007-12-09 13:44:23 +00:00
parent e3d027a25f
commit 5aa2647ade
5 changed files with 18 additions and 20 deletions
@@ -32,7 +32,7 @@ using namespace std;
LobbyChat::LobbyChat(gameLobbyDialogImpl* l, ConfigFile *c) : myLobby(l), myConfig(c)
{
myChatTools = new ChatTools(myLobby->lineEdit_ChatInput, myConfig, 1, myLobby->textBrowser_ChatDisplay, myLobby->treeWidget_NickList);
myChatTools = new ChatTools(myLobby->lineEdit_ChatInput, myConfig, 1, myLobby->textBrowser_ChatDisplay, myLobby->treeWidget_NickList, myLobby->getMyW()->getMySDLPlayer(), myLobby);
}
LobbyChat::~LobbyChat()
@@ -128,16 +128,7 @@ void LobbyChat::playerLeft(QString playerName)
void LobbyChat::displayMessage(QString playerName, QString message) {
QString tempMsg;
if(message.contains(QString::fromUtf8(myConfig->readConfigString("MyName").c_str()), Qt::CaseInsensitive)) {
tempMsg = QString("<b>"+message+"</b>");
if(myLobby->isVisible() && myConfig->readConfigInt("PlayLobbyChatNotification"))
myLobby->getMyW()->getMySDLPlayer()->playSound("lobbychatnotify",0);
}
else {
tempMsg = message;
}
myLobby->textBrowser_ChatDisplay->append(playerName + ": " + tempMsg);
myChatTools->receiveMessage(playerName, message);
}
void LobbyChat::checkInputLength(QString string) {