From 2afc64e6fa8aa0ee41290c8232733881026cab10 Mon Sep 17 00:00:00 2001 From: Eugene Kondrashev Date: Wed, 11 Nov 2009 13:08:02 +0200 Subject: Fixed Normal bug EXT-1959 - [BSI] emotes difficult to see in IM/Group chat --HG-- branch : product-engine --- indra/newview/llimfloater.cpp | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'indra/newview/llimfloater.cpp') diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index a634a1b0fd..8b44ccebdd 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -479,11 +479,29 @@ void LLIMFloater::updateMessages() LLStyle::Params style_params; style_params.color(chat_color); - LLChat chat(message); + LLChat chat; chat.mFromID = from_id; chat.mFromName = from; - mChatHistory->appendWidgetMessage(chat, style_params); + //Handle IRC styled /me messages. + std::string prefix = message.substr(0, 4); + if (prefix == "/me " || prefix == "/me'") + { + if (from.size() > 0) + { + style_params.font.style = "ITALIC"; + chat.mText = from + " "; + mChatHistory->appendWidgetMessage(chat, style_params); + } + message = message.substr(3); + style_params.font.style = "UNDERLINE"; + mChatHistory->appendText(message, FALSE, style_params); + } + else + { + chat.mText = message; + mChatHistory->appendWidgetMessage(chat, style_params); + } mLastMessageIndex = msg["index"].asInteger(); } -- cgit v1.2.3