Group Feature Request: Optionally display indicator over typing avatar's heads.

Adds Debug Setting UseTypingBubbles
Adds "Use overhead typing indicator bubbles" to Adv. Chat-> Chat/IM
Thanks to Firestorm for this simple addition
This commit is contained in:
Lirusaito
2013-04-24 14:15:00 -04:00
parent 3a4714edb1
commit bca8f830f2
6 changed files with 31 additions and 4 deletions

View File

@@ -15173,6 +15173,17 @@ This should be as low as possible, but too low may break functionality</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>UseTypingBubbles</key>
<map>
<key>Comment</key>
<string>Show typing indicator in avatar nametags</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>UseDebugMenus</key>
<map>
<key>Comment</key>

View File

@@ -329,6 +329,7 @@ void LLPrefsAscentChat::refreshValues()
mHideTypingNotification = gSavedSettings.getBOOL("AscentHideTypingNotification");
mShowGroupNameInChatIM = gSavedSettings.getBOOL("OptionShowGroupNameInChatIM");
mShowDisplayNameChanges = gSavedSettings.getBOOL("ShowDisplayNameChanges");
mUseTypingBubbles = gSavedSettings.getBOOL("UseTypingBubbles");
mPlayTypingSound = gSavedSettings.getBOOL("PlayTypingSound");
mHideNotificationsInChat = gSavedSettings.getBOOL("HideNotificationsInChat");
mEnableMUPose = gSavedSettings.getBOOL("AscentAllowMUpose");
@@ -545,6 +546,7 @@ void LLPrefsAscentChat::cancel()
gSavedSettings.setBOOL("AscentHideTypingNotification", mHideTypingNotification);
gSavedSettings.setBOOL("OptionShowGroupNameInChatIM", mShowGroupNameInChatIM);
gSavedSettings.setBOOL("ShowDisplayNameChanges", mShowDisplayNameChanges);
gSavedSettings.setBOOL("UseTypingBubbles", mUseTypingBubbles);
gSavedSettings.setBOOL("PlayTypingSound", mPlayTypingSound);
gSavedSettings.setBOOL("HideNotificationsInChat", mHideNotificationsInChat);
gSavedSettings.setBOOL("AscentAllowMUpose", mEnableMUPose);

View File

@@ -66,6 +66,7 @@ protected:
BOOL mHideTypingNotification;
BOOL mShowGroupNameInChatIM;
bool mShowDisplayNameChanges;
bool mUseTypingBubbles;
BOOL mPlayTypingSound;
BOOL mHideNotificationsInChat;
BOOL mEnableMUPose;

View File

@@ -2830,14 +2830,17 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
static const LLCachedControl<F32> NAME_SHOW_TIME("RenderNameShowTime",10); // seconds
static const LLCachedControl<F32> FADE_DURATION("RenderNameFadeDuration",1); // seconds
static const LLCachedControl<bool> use_chat_bubbles("UseChatBubbles",false);
static const LLCachedControl<bool> use_typing_bubbles("UseTypingBubbles");
static const LLCachedControl<bool> render_name_hide_self("RenderNameHideSelf",false);
static const LLCachedControl<bool> allow_nameplate_override ("CCSAllowNameplateOverride", true);
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.0b
// [RLVa:KB] - Checked: 2010-04-04 (RLVa-1.2.2a) | Added: RLVa-0.2.0b
bool fRlvShowNames = gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES);
// [/RLVa:KB]
BOOL visible_avatar = isVisible() || mNeedsAnimUpdate;
BOOL visible_chat = use_chat_bubbles && (mChats.size() || mTyping);
bool visible_typing = use_typing_bubbles && mTyping;
BOOL render_name = visible_chat ||
visible_typing ||
(visible_avatar &&
// [RLVa:KB] - Checked: 2010-04-04 (RLVa-1.2.2a) | Added: RLVa-1.0.0h
( (!fRlvShowNames) || (RlvSettings::getShowNameTags()) ) &&
@@ -2871,6 +2874,11 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
mVisibleChat = visible_chat;
new_name = TRUE;
}
if (visible_typing != mVisibleTyping)
{
mVisibleTyping = visible_typing;
new_name = true;
}
// [RLVa:KB] - Checked: 2010-04-04 (RLVa-1.2.2a) | Added: RLVa-0.2.0b
if (fRlvShowNames)
@@ -2895,7 +2903,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
if (mAppAngle > 5.f)
{
const F32 START_FADE_TIME = NAME_SHOW_TIME - FADE_DURATION;
if (!visible_chat && sRenderName == RENDER_NAME_FADE && time_visible > START_FADE_TIME)
if (!visible_chat && !visible_typing && sRenderName == RENDER_NAME_FADE && time_visible > START_FADE_TIME)
{
alpha = 1.f - (time_visible - START_FADE_TIME) / FADE_DURATION;
}
@@ -3271,7 +3279,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
new_name = TRUE;
}
if (mVisibleChat)
if (mVisibleChat || mVisibleTyping)
{
mNameText->setFont(LLFontGL::getFontSansSerif());
mNameText->setTextAlignment(LLHUDNameTag::ALIGN_TEXT_LEFT);
@@ -3281,6 +3289,8 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
mNameText->clearString();
LLColor4 new_chat = gColors.getColor( "AvatarNameColor" );
if (mVisibleChat)
{
LLColor4 normal_chat = lerp(new_chat, LLColor4(0.8f, 0.8f, 0.8f, 1.f), 0.7f);
LLColor4 old_chat = lerp(normal_chat, LLColor4(0.6f, 0.6f, 0.6f, 1.f), 0.7f);
if (mTyping && mChats.size() >= MAX_BUBBLE_CHAT_UTTERANCES)
@@ -3320,6 +3330,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
mNameText->addLine(chat_iter->mText, old_chat, style);
}
}
}
mNameText->setVisibleOffScreen(TRUE);
if (mTyping)
@@ -3351,7 +3362,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
void LLVOAvatar::addNameTagLine(const std::string& line, const LLColor4& color, S32 style, const LLFontGL* font)
{
llassert(mNameText);
if (mVisibleChat)
if (mVisibleChat || mVisibleTyping)
{
mNameText->addLabel(line);
}

View File

@@ -814,6 +814,7 @@ public:
void stopTyping() { mTyping = FALSE; mIdleTimer.reset();}
private:
BOOL mVisibleChat;
bool mVisibleTyping;
//--------------------------------------------------------------------
// Lip synch morphs

View File

@@ -24,6 +24,7 @@
<check_box bottom_delta="-20" follows="left|top" control_name="OptionShowGroupNameInChatIM" initial_value="false"
label="Show group name in chat" tool_tip="The name of the group will also be displayed if the IM is from group chat." name="append_group_name_check"/>
<check_box bottom_delta="-20" follows="left|top" control_name="ShowDisplayNameChanges" label="Show display name changes" tool_tip="When checked, a notification will come up in chat whenever someone's display name changes." name="display_name_change"/>
<check_box bottom_delta="-20" follows="left|top" control_name="UseTypingBubbles" label="Use overhead typing indicator bubbles" name="use_typing_bubbles"/>
<text bottom="-150" left="10" follows="left|top" name="objects_link_text_box3">Show links on chatting object names in chat history for:</text>
<radio_group bottom_delta="-26" control_name="LinksForChattingObjects" tool_tip="Enables a link to show you the owner of the speaking object."
follows="top" height="20" left="20" name="objects_link" width="350">