summaryrefslogtreecommitdiff
path: root/indra/newview/llavatarlistitem.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llavatarlistitem.h')
-rw-r--r--indra/newview/llavatarlistitem.h32
1 files changed, 24 insertions, 8 deletions
diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h
index aa1b7593f5..96097bc9b5 100644
--- a/indra/newview/llavatarlistitem.h
+++ b/indra/newview/llavatarlistitem.h
@@ -46,6 +46,15 @@ class LLAvatarIconCtrl;
class LLAvatarListItem : public LLPanel, public LLFriendObserver
{
public:
+ typedef enum e_item_state_type {
+ IS_DEFAULT,
+ IS_VOICE_INVITED,
+ IS_VOICE_JOINED,
+ IS_VOICE_LEFT,
+ IS_ONLINE,
+ IS_OFFLINE,
+ } EItemState;
+
class ContextMenu
{
public:
@@ -73,6 +82,7 @@ public:
void setOnline(bool online);
void setName(const std::string& name);
void setHighlight(const std::string& highlight);
+ void setState(EItemState item_style);
void setAvatarId(const LLUUID& id, bool ignore_status_changes = false);
void setLastInteractionTime(U32 secs_since);
//Show/hide profile/info btn, translating speaker indicator and avatar name coordinates accordingly
@@ -91,8 +101,6 @@ public:
void showInfoBtn(bool show_info_btn) {mInfoBtn->setVisible(show_info_btn); }
void showLastInteractionTime(bool show);
- void setContextMenu(ContextMenu* menu) { mContextMenu = menu; }
-
/**
* This method was added to fix EXT-2364 (Items in group/ad-hoc IM participant list (avatar names) should be reshaped when adding/removing the "(Moderator)" label)
* But this is a *HACK. The real reason of it was in incorrect logic while hiding profile/info/speaker buttons
@@ -106,6 +114,8 @@ protected:
*/
LLOutputMonitorCtrl* mSpeakingIndicator;
+ LLAvatarIconCtrl* mAvatarIcon;
+
private:
typedef enum e_online_status {
@@ -119,14 +129,18 @@ private:
std::string formatSeconds(U32 secs);
- LLAvatarIconCtrl* mAvatarIcon;
+ typedef std::map<EItemState, LLStyle::Params> item_style_map_t;
+ static item_style_map_t& getItemStylesParams();
+
+ typedef std::map<EItemState, LLColor4> icon_color_map_t;
+ static icon_color_map_t& getItemIconColorMap();
+
LLTextBox* mAvatarName;
LLTextBox* mLastInteractionTime;
LLStyle::Params mAvatarNameStyle;
LLButton* mInfoBtn;
LLButton* mProfileBtn;
- ContextMenu* mContextMenu;
LLUUID mAvatarId;
std::string mHighlihtSubstring; // substring to highlight
@@ -135,10 +149,12 @@ private:
//Speaker indicator and avatar name coords are translated accordingly
bool mShowInfoBtn;
bool mShowProfileBtn;
- S32 mIconWidth; // icon width + padding
- S32 mInfoBtnWidth; //info btn width + padding
- S32 mProfileBtnWidth; //profile btn width + padding
- S32 mSpeakingIndicatorWidth; //speaking indicator width + padding
+
+ static bool sStaticInitialized; // this variable is introduced to improve code readability
+ static S32 sIconWidth; // icon width + padding
+ static S32 sInfoBtnWidth; //info btn width + padding
+ static S32 sProfileBtnWidth; //profile btn width + padding
+ static S32 sSpeakingIndicatorWidth; //speaking indicator width + padding
};
#endif //LL_LLAVATARLISTITEM_H