summaryrefslogtreecommitdiff
path: root/indra/newview/llchatitemscontainerctrl.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2009-11-17 18:35:38 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2009-11-17 18:35:38 +0000
commit939e48d38cf9f15e1f7220cc3860810badd8a778 (patch)
treee7135ea43d8945c173c5cade2c3767193fa76f56 /indra/newview/llchatitemscontainerctrl.cpp
parenta402f4894d72209f9ac9bc9d7962c28b3c26bb18 (diff)
parent6253e2611d3ecf4ff5c778d0e53f34aed06f35da (diff)
merge.
Diffstat (limited to 'indra/newview/llchatitemscontainerctrl.cpp')
-rw-r--r--indra/newview/llchatitemscontainerctrl.cpp34
1 files changed, 29 insertions, 5 deletions
diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
index d2e3247250..b1dee46d2e 100644
--- a/indra/newview/llchatitemscontainerctrl.cpp
+++ b/indra/newview/llchatitemscontainerctrl.cpp
@@ -160,10 +160,14 @@ void LLNearbyChatToastPanel::init(LLSD& notification)
LLStyle::Params style_params;
style_params.color(mTextColor);
- style_params.font(mFont);
-
- std::string str_sender;
+// style_params.font(mFont);
+ std::string font_name = LLFontGL::nameFromFont(mFont);
+ std::string font_style_size = LLFontGL::sizeFromFont(mFont);
+ style_params.font.name(font_name);
+ style_params.font.size(font_style_size);
+ std::string str_sender;
+
if(gAgentID != mFromID)
str_sender = mFromName;
else
@@ -173,10 +177,28 @@ void LLNearbyChatToastPanel::init(LLSD& notification)
caption->getChild<LLTextBox>("msg_time", false)->setText(appendTime() , style_params );
-
LLChatMsgBox* msg_text = getChild<LLChatMsgBox>("msg_text", false);
- msg_text->setText(mText, style_params);
+
+ if(notification["chat_style"].asInteger()== CHAT_STYLE_IRC)
+ {
+ if (mFromName.size() > 0)
+ {
+ style_params.font.style = "ITALIC";
+
+ msg_text->setText(mFromName, style_params);
+ }
+ mText = mText.substr(3);
+ style_params.font.style = "UNDERLINE";
+ msg_text->addText(mText,style_params);
+ }
+ else
+ {
+ msg_text->setText(mText, style_params);
+ }
+
+
+
LLUICtrl* msg_inspector = caption->getChild<LLUICtrl>("msg_inspector");
if(mSourceType != CHAT_SOURCE_AGENT)
msg_inspector->setVisible(false);
@@ -196,6 +218,8 @@ void LLNearbyChatToastPanel::setMessage (const LLChat& chat_msg)
notification["from_id"] = chat_msg.mFromID;
notification["time"] = chat_msg.mTime;
notification["source"] = (S32)chat_msg.mSourceType;
+ notification["chat_type"] = (S32)chat_msg.mChatType;
+ notification["chat_style"] = (S32)chat_msg.mChatStyle;
std::string r_color_name="White";
F32 r_color_alpha = 1.0f;