diff options
author | Mike Antipov <mantipov@productengine.com> | 2009-12-24 13:13:49 +0200 |
---|---|---|
committer | Mike Antipov <mantipov@productengine.com> | 2009-12-24 13:13:49 +0200 |
commit | 2773a3bb7b864f61064543b4bdbb61dd40bdb298 (patch) | |
tree | b09a0af50af47bf3e4822b6397aa29859de5483b /indra/newview | |
parent | 46948d9fcc9149c3c416167f166aff6ce8fa88d5 (diff) |
Work on normal task EXT-3636 (Code Improvements: Voice control panels - Make Voice states and fade timeout xml driven)
-- added possibility to set avatar item online/offline styles via xml.
-- commited fake xml panel file with styles missed in previous commit.
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llavatarlistitem.cpp | 15 | ||||
-rw-r--r-- | indra/newview/llavatarlistitem.h | 2 |
2 files changed, 14 insertions, 3 deletions
diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index d70e3c61b9..76e2f2191a 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -166,8 +166,7 @@ void LLAvatarListItem::setOnline(bool online) mOnlineStatus = (EOnlineStatus) online; // Change avatar name font style depending on the new online status. - mAvatarNameStyle.color = online ? LLColor4::white : LLColor4::grey; - setNameInternal(mAvatarName->getText(), mHighlihtSubstring); + setStyle(online ? IS_ONLINE : IS_OFFLINE); // Make the icon fade if the avatar goes offline. mAvatarIcon->setColor(online ? LLColor4::white : LLColor4::smoke); @@ -192,7 +191,7 @@ void LLAvatarListItem::setStyle(EItemStyle voice_state) // *NOTE: You cannot set the style on a text box anymore, you must // rebuild the text. This will cause problems if the text contains // hyperlinks, as their styles will be wrong. - mAvatarName->setText(mAvatarName->getText(), mAvatarNameStyle); + setNameInternal(mAvatarName->getText(), mHighlihtSubstring); // *TODO: move icon colors into colors.xml mAvatarIcon->setColor(voice_state == IS_VOICE_JOINED ? LLColor4::white : LLColor4::smoke); @@ -441,6 +440,14 @@ LLAvatarListItem::voice_state_map_t LLAvatarListItem::getItemStylesParams() item_styles_params_map.insert( std::make_pair(IS_VOICE_LEFT, params_panel->getChild<LLTextBox>("voice_call_left_style")->getDefaultStyle())); + + item_styles_params_map.insert( + std::make_pair(IS_ONLINE, + params_panel->getChild<LLTextBox>("online_style")->getDefaultStyle())); + + item_styles_params_map.insert( + std::make_pair(IS_OFFLINE, + params_panel->getChild<LLTextBox>("offline_style")->getDefaultStyle())); } else { @@ -448,6 +455,8 @@ LLAvatarListItem::voice_state_map_t LLAvatarListItem::getItemStylesParams() item_styles_params_map.insert(std::make_pair(IS_VOICE_INVITED, LLStyle::Params())); item_styles_params_map.insert(std::make_pair(IS_VOICE_JOINED, LLStyle::Params())); item_styles_params_map.insert(std::make_pair(IS_VOICE_LEFT, LLStyle::Params())); + item_styles_params_map.insert(std::make_pair(IS_ONLINE, LLStyle::Params())); + item_styles_params_map.insert(std::make_pair(IS_OFFLINE, LLStyle::Params())); } if (params_panel) params_panel->die(); diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index d544ed459e..628061b033 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -51,6 +51,8 @@ public: IS_VOICE_INVITED, IS_VOICE_JOINED, IS_VOICE_LEFT, + IS_ONLINE, + IS_OFFLINE, } EItemStyle; class ContextMenu |