Fix the issue with chat bubbles having the chatter's name at the start of normal messages, also connect the italicize actions option to chat bubbles.
Moves the "We have a real utterance now" block back above the concatenation of names and verbs and the message. Maybe italicize should be tied to a separate setting for bubble chat, but for now let's see if it is fine in its current state.
This commit is contained in:
@@ -3693,6 +3693,9 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
|
|||||||
chat.mText = from_name;
|
chat.mText = from_name;
|
||||||
mesg = mesg.substr(3);
|
mesg = mesg.substr(3);
|
||||||
ircstyle = TRUE;
|
ircstyle = TRUE;
|
||||||
|
// This block was moved up to allow bubbles with italicized chat
|
||||||
|
// set CHAT_STYLE_IRC to avoid adding Avatar Name as author of message. See EXT-656
|
||||||
|
chat.mChatStyle = CHAT_STYLE_IRC;
|
||||||
}
|
}
|
||||||
chat.mText += mesg;
|
chat.mText += mesg;
|
||||||
|
|
||||||
@@ -3720,12 +3723,23 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We have a real utterance now, so can stop showing "..." and proceed.
|
||||||
|
if (chatter && chatter->isAvatar())
|
||||||
|
{
|
||||||
|
LLLocalSpeakerMgr::getInstance()->setSpeakerTyping(from_id, FALSE);
|
||||||
|
static_cast<LLVOAvatar*>(chatter)->stopTyping();
|
||||||
|
|
||||||
|
if (!is_muted && !is_busy)
|
||||||
|
{
|
||||||
|
static const LLCachedControl<bool> use_chat_bubbles("UseChatBubbles",false);
|
||||||
|
visible_in_chat_bubble = use_chat_bubbles;
|
||||||
|
static_cast<LLVOAvatar*>(chatter)->addChat(chat);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Look for IRC-style emotes
|
// Look for IRC-style emotes
|
||||||
if (ircstyle)
|
if (ircstyle)
|
||||||
{
|
{
|
||||||
// set CHAT_STYLE_IRC to avoid adding Avatar Name as author of message. See EXT-656
|
|
||||||
chat.mChatStyle = CHAT_STYLE_IRC;
|
|
||||||
|
|
||||||
// Do nothing, ircstyle is fixed above for chat bubbles
|
// Do nothing, ircstyle is fixed above for chat bubbles
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -3852,20 +3866,6 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
|
|||||||
chat.mText = from_name + verb + mesg;
|
chat.mText = from_name + verb + mesg;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We have a real utterance now, so can stop showing "..." and proceed.
|
|
||||||
if (chatter && chatter->isAvatar())
|
|
||||||
{
|
|
||||||
LLLocalSpeakerMgr::getInstance()->setSpeakerTyping(from_id, FALSE);
|
|
||||||
((LLVOAvatar*)chatter)->stopTyping();
|
|
||||||
|
|
||||||
if (!is_muted && !is_busy)
|
|
||||||
{
|
|
||||||
static const LLCachedControl<bool> use_chat_bubbles("UseChatBubbles",false);
|
|
||||||
visible_in_chat_bubble = use_chat_bubbles;
|
|
||||||
((LLVOAvatar*)chatter)->addChat(chat);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (chatter)
|
if (chatter)
|
||||||
{
|
{
|
||||||
chat.mPosAgent = chatter->getPositionAgent();
|
chat.mPosAgent = chatter->getPositionAgent();
|
||||||
|
|||||||
@@ -3318,6 +3318,13 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
|
|||||||
{
|
{
|
||||||
F32 chat_fade_amt = llclamp((F32)((LLFrameTimer::getElapsedSeconds() - chat_iter->mTime) / CHAT_FADE_TIME), 0.f, 4.f);
|
F32 chat_fade_amt = llclamp((F32)((LLFrameTimer::getElapsedSeconds() - chat_iter->mTime) / CHAT_FADE_TIME), 0.f, 4.f);
|
||||||
LLFontGL::StyleFlags style;
|
LLFontGL::StyleFlags style;
|
||||||
|
|
||||||
|
// Singu Note: The following tweak may be a bad idea, though they've asked for actions to be italicized, the chat type for actions becomes irrelevant
|
||||||
|
// If LLFontGL::StyleFlags wasn't the parameter type, font styles could be combined and underline could be used, but that may be unnatural...
|
||||||
|
static const LLCachedControl<bool> italicize("LiruItalicizeActions");
|
||||||
|
if (italicize && chat_iter->mChatStyle == CHAT_STYLE_IRC)
|
||||||
|
style = LLFontGL::ITALIC;
|
||||||
|
else
|
||||||
switch(chat_iter->mChatType)
|
switch(chat_iter->mChatType)
|
||||||
{
|
{
|
||||||
case CHAT_TYPE_WHISPER:
|
case CHAT_TYPE_WHISPER:
|
||||||
|
|||||||
Reference in New Issue
Block a user