From db0e25cb6c4da4929eedf4af11584d1b60848a4c Mon Sep 17 00:00:00 2001 From: Koncord Date: Sat, 29 Apr 2017 20:23:21 +0800 Subject: [PATCH] [Client] Allow colors in the chat window --- apps/openmw/mwmp/GUIChat.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwmp/GUIChat.cpp b/apps/openmw/mwmp/GUIChat.cpp index 39148f865..36616d724 100644 --- a/apps/openmw/mwmp/GUIChat.cpp +++ b/apps/openmw/mwmp/GUIChat.cpp @@ -38,6 +38,8 @@ namespace mwmp mHistory->setOverflowToTheLeft(true); mHistory->setEditWordWrap(true); + mHistory->setTextShadow(true); + mHistory->setTextShadowColour(MyGUI::Colour::Black); windowState = 0; mCommandLine->setVisible(0); @@ -67,7 +69,7 @@ namespace mwmp void GUIChat::acceptCommand(MyGUI::EditBox *_sender) { - const std::string &cm = mCommandLine->getOnlyText(); + const std::string &cm = MyGUI::TextIterator::toTagsString(mCommandLine->getCaption()); // If they enter nothing, then it should be canceled. // Otherwise, there's no way of closing without having text. @@ -112,7 +114,7 @@ namespace mwmp { setVisible(true); } - mHistory->addText(color + MyGUI::TextIterator::toTagsString(msg)); + mHistory->addText(color+msg); LOG_MESSAGE_SIMPLE(Log::LOG_INFO, msg.c_str()); }