diff options
author | angela <angela@lindenlab.com> | 2009-11-17 10:04:41 +0800 |
---|---|---|
committer | angela <angela@lindenlab.com> | 2009-11-17 10:04:41 +0800 |
commit | 28aa749db58b3a4095ca7e59811900767cd897b0 (patch) | |
tree | 82337af6ace682a5f5f5a7646f5dfd0dc44fa56a /indra/newview/llimfloater.cpp | |
parent | 27a555e443c98ce1a41ef21e6111bdfe903894e8 (diff) | |
parent | bce2cab144214b5a90a702e62f1e7c98e93fefc3 (diff) |
Automated merge with ssh://angela@hg.lindenlab.com/viewer/viewer-2-0/
Diffstat (limited to 'indra/newview/llimfloater.cpp')
-rw-r--r-- | indra/newview/llimfloater.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index e3121fbc7a..dff27ee032 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -477,7 +477,33 @@ void LLIMFloater::updateMessages() chat.mFromName = from; chat.mText = message; - mChatHistory->appendWidgetMessage(chat); + LLStyle::Params append_style_params; + //Handle IRC styled /me messages. + std::string prefix = message.substr(0, 4); + if (prefix == "/me " || prefix == "/me'") + { + if (from.size() > 0) + { + append_style_params.italic= true; + chat.mText = from + " "; + mChatHistory->appendWidgetMessage(chat, append_style_params); + } + message = message.substr(3); + + LLColor4 txt_color = LLUIColorTable::instance().getColor("White"); + LLViewerChat::getChatColor(chat,txt_color); + LLFontGL* fontp = LLViewerChat::getChatFont(); + append_style_params.color(txt_color); + append_style_params.readonly_color(txt_color); + append_style_params.font(fontp); + append_style_params.underline = true; + mChatHistory->appendText(message, FALSE, append_style_params); + } + else + { + chat.mText = message; + mChatHistory->appendWidgetMessage(chat); + } mLastMessageIndex = msg["index"].asInteger(); } |