From 644c5cadbf8a0ab3ea7c2137e8819220a010c93f Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 10 Feb 2010 12:04:03 -0800 Subject: Name tags of friends appear in green. Refactored LLVOAvatar idleUpdateNameTag into smaller functions Eliminated unused LLHUDText::setUsePixelSize --- indra/newview/llvoavatar.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'indra/newview/llvoavatar.h') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index a5815df20a..5cc4aaa52e 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -210,6 +210,8 @@ public: void idleUpdateLoadingEffect(); void idleUpdateWindEffect(); void idleUpdateNameTag(const LLVector3& root_pos_last); + LLVector3 idleUpdateNameTagPosition(const LLVector3& root_pos_last); + void idleUpdateNameTagColor(BOOL new_name, F32 alpha); void idleUpdateRenderCost(); void idleUpdateTractorBeam(); void idleUpdateBelowWater(); @@ -822,10 +824,12 @@ protected: private: LLWString mNameString; std::string mTitle; - BOOL mNameAway; - BOOL mNameBusy; - BOOL mNameMute; - BOOL mNameAppearance; + bool mNameAway; + bool mNameBusy; + bool mNameMute; + bool mNameAppearance; + bool mNameFriend; + F32 mNameAlpha; BOOL mRenderGroupTitles; //-------------------------------------------------------------------- -- cgit v1.2.3 From af8f8b4770eb45b4238d98ddd574ba726470f797 Mon Sep 17 00:00:00 2001 From: James Cook Date: Fri, 19 Feb 2010 11:11:45 -0800 Subject: Improved support for toggling display names on/off Stop pre-populated name cache because we have a web service now for lookup Added mIsLegacy to LLAvatarName so we can colorize those name tags differently --- indra/newview/llvoavatar.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llvoavatar.h') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index cf3f40979b..f70c68bcba 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -831,6 +831,7 @@ private: bool mNameFriend; F32 mNameAlpha; BOOL mRenderGroupTitles; + bool mUseDisplayNames; // IDEVO HACK to force refresh //-------------------------------------------------------------------- // Display the name (then optionally fade it out) -- cgit v1.2.3 From 70f4e8ede81e1a1259345891c946dc447d686718 Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 24 Feb 2010 11:03:52 -0800 Subject: Use async display name lookup for name tags, makes them refresh properly when toggling display name feature --- indra/newview/llvoavatar.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llvoavatar.h') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index f70c68bcba..b370bcb26d 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -210,6 +210,7 @@ public: void idleUpdateLoadingEffect(); void idleUpdateWindEffect(); void idleUpdateNameTag(const LLVector3& root_pos_last); + void idleUpdateNameTagText(BOOL new_name); LLVector3 idleUpdateNameTagPosition(const LLVector3& root_pos_last); void idleUpdateNameTagColor(BOOL new_name, F32 alpha); void idleUpdateRenderCost(); -- cgit v1.2.3 From f3e0e9a5264a80d146a1d4d77fd9c4f5d3070278 Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 24 Feb 2010 14:31:46 -0800 Subject: Hack to refresh name tags when I change my display name. Also fixes a crash when turning on display names. --- indra/newview/llvoavatar.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llvoavatar.h') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index b370bcb26d..b1bdf453f3 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -819,6 +819,7 @@ private: public: std::string getFullname() const; // Returns "FirstName LastName" + void invalidateName(); // force name to update protected: static void getAnimLabels(LLDynamicArray* labels); static void getAnimNames(LLDynamicArray* names); -- cgit v1.2.3 From 36c35bca2663447216027015c10aa921ab75abfb Mon Sep 17 00:00:00 2001 From: James Cook Date: Thu, 25 Feb 2010 17:06:17 -0800 Subject: Support multiple fonts, colors and styles in name tags Simplified LLHUDText string API to be UTF8 only Added per-text segment font support Changed LLVOAvatar invalidateNameTag to clearNameTag --- indra/newview/llvoavatar.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/newview/llvoavatar.h') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index b1bdf453f3..b63e3b2ebd 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -212,7 +212,10 @@ public: void idleUpdateNameTag(const LLVector3& root_pos_last); void idleUpdateNameTagText(BOOL new_name); LLVector3 idleUpdateNameTagPosition(const LLVector3& root_pos_last); - void idleUpdateNameTagColor(BOOL new_name, F32 alpha); + void idleUpdateNameTagAlpha(BOOL new_name, F32 alpha); + LLColor4 getNameTagColor(bool is_friend); + void clearNameTag(); + void addNameTagLine(const std::string& line, const LLColor4& color, S32 style, const LLFontGL* font); void idleUpdateRenderCost(); void idleUpdateTractorBeam(); void idleUpdateBelowWater(); @@ -819,12 +822,11 @@ private: public: std::string getFullname() const; // Returns "FirstName LastName" - void invalidateName(); // force name to update protected: static void getAnimLabels(LLDynamicArray* labels); static void getAnimNames(LLDynamicArray* names); private: - LLWString mNameString; + std::string mNameString; // UTF-8 title + name + status std::string mTitle; bool mNameAway; bool mNameBusy; -- cgit v1.2.3 From 717a4800f1ae0ae6ea0bbe9ed0af21c7851f5d0a Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 9 Mar 2010 14:28:48 -0800 Subject: Break name tag code out into LLHUDNameTag Start by duplicating the LLHUDText code, then stripping out functionality that only needs to exist in one place (like force-based juggling of name tag positions) --- indra/newview/llvoavatar.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llvoavatar.h') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index b63e3b2ebd..c31369358c 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -65,7 +65,7 @@ extern const LLUUID ANIM_AGENT_WALK_ADJUST; class LLTexLayerSet; class LLVoiceVisualizer; -class LLHUDText; +class LLHUDNameTag; class LLHUDEffectSpiral; class LLTexGlobalColor; class LLVOAvatarBoneInfo; @@ -842,7 +842,7 @@ private: //-------------------------------------------------------------------- public: LLFrameTimer mChatTimer; - LLPointer mNameText; + LLPointer mNameText; private: LLFrameTimer mTimeVisible; std::deque mChats; -- cgit v1.2.3 From d2f9e34598621f1dabad15025417efd6b81dddf0 Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 23 Mar 2010 11:41:33 -0700 Subject: Part DEV-47695 route display name changes via sim for rebroadcast to nearby avatars for name tag updates and to update cached display name for LSL nonblocking functions --- indra/newview/llvoavatar.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llvoavatar.h') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index c31369358c..65343c9058 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -215,6 +215,7 @@ public: void idleUpdateNameTagAlpha(BOOL new_name, F32 alpha); LLColor4 getNameTagColor(bool is_friend); void clearNameTag(); + static void invalidateNameTag(const LLUUID& agent_id); void addNameTagLine(const std::string& line, const LLColor4& color, S32 style, const LLFontGL* font); void idleUpdateRenderCost(); void idleUpdateTractorBeam(); -- cgit v1.2.3 From d89de271437f35f9d26e28409e6cc1d593a2fc7a Mon Sep 17 00:00:00 2001 From: James Cook Date: Mon, 26 Apr 2010 10:51:42 -0700 Subject: DEV-47529 Viewer turns display names on/off based on region capability Also refreshes name tags so you can see the state. Reviewed with Kelly. --- indra/newview/llvoavatar.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llvoavatar.h') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 4e0275deb5..ad0e2b096e 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -216,6 +216,8 @@ public: LLColor4 getNameTagColor(bool is_friend); void clearNameTag(); static void invalidateNameTag(const LLUUID& agent_id); + // force all name tags to rebuild, useful when display names turned on/off + static void invalidateNameTags(); void addNameTagLine(const std::string& line, const LLColor4& color, S32 style, const LLFontGL* font); void idleUpdateRenderCost(); void idleUpdateTractorBeam(); -- cgit v1.2.3 From e7b1a16f071ff0ab253136a284e20d737352a5ca Mon Sep 17 00:00:00 2001 From: James Cook Date: Thu, 20 May 2010 16:39:26 -0700 Subject: Strip out debug code related to toggling display names on/off --- indra/newview/llvoavatar.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llvoavatar.h') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 703066b7a6..c99902a540 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -843,7 +843,6 @@ private: bool mNameCloud; F32 mNameAlpha; BOOL mRenderGroupTitles; - bool mUseDisplayNames; // IDEVO HACK to force refresh //-------------------------------------------------------------------- // Display the name (then optionally fade it out) -- cgit v1.2.3