summaryrefslogtreecommitdiff
path: root/indra/newview/llchatitemscontainerctrl.cpp
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2009-11-17 16:36:22 +0200
committerVadim Savchuk <vsavchuk@productengine.com>2009-11-17 16:36:22 +0200
commit402e957c56113550e53a3892908c6c7a5c16783a (patch)
tree33cf9a73825392b2ed08d1de91c6bd4c0a28d83b /indra/newview/llchatitemscontainerctrl.cpp
parent53be27e742b642c1642c3289e3e11b300a14d360 (diff)
parent2217a677104ffadab8815a0886d66ac264e74792 (diff)
Merge from default branch.
Added missing trailing newline to fix Linux build. --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llchatitemscontainerctrl.cpp')
-rw-r--r--indra/newview/llchatitemscontainerctrl.cpp33
1 files changed, 29 insertions, 4 deletions
diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
index 244c7b1794..997aed4277 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
@@ -172,8 +176,27 @@ void LLNearbyChatToastPanel::init(LLSD& notification)
caption->getChild<LLTextBox>("sender_name", false)->setText(str_sender , 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);
@@ -193,6 +216,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;