diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 5cd531e3eb..f23ae785a2 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -25130,6 +25130,41 @@ Change of this parameter will affect the layout of buttons in notification toast SanityComment This value needs to be greater than 0 for a fading effect. + + FSHudTextShowBackground + + Comment + Displays a black/white background behind the prim floating text to make the text more readable + Persist + 1 + Type + S32 + Value + 0 + + FSHudTextBackgroundOpacity + + Comment + Opacity of floating text background (0.0 = completely transparent, 1.0 = completely opaque) + Persist + 1 + Type + F32 + Value + 0.75 + + FSHudTextUseHoverHighlight + + Comment + When an object is being hovered over, highlight the HUD text by moving to the foreground and disable alpha + Persist + 1 + Type + Boolean + Value + 0 + + FSStartupClearBrowserCache Comment diff --git a/indra/newview/llhudobject.cpp b/indra/newview/llhudobject.cpp index 1dd136f61f..1fbdc47ff1 100644 --- a/indra/newview/llhudobject.cpp +++ b/indra/newview/llhudobject.cpp @@ -52,6 +52,25 @@ struct hud_object_further_away bool hud_object_further_away::operator()(const LLPointer& lhs, const LLPointer& rhs) const { + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + // This overrides distance comparision if either of the objects is highlighted. + // Get the FSHudTextUseHoverHighlight value from the saved settings and if it is enabled, then check if either object is highlighed + static LLCachedControl mbUseHoverHighlight(*LLControlGroup::getInstance("Global"), "FSHudTextUseHoverHighlight"); + if (mbUseHoverHighlight) + { + // If the left object is highlighted then return false to force it be closer to the screen. + if (lhs->getIsHighlighted()) + { + return false; + } + // Else if the right object is highlighted, then return true to force it to be closer to the screen. + else if (rhs->getIsHighlighted()) + { + return true; + } + } + // Otherwise, neither object is heighlighted, so fall back to the normal distance comparison. + // [FIRE-35019] return lhs->getDistance() > rhs->getDistance(); } @@ -64,6 +83,9 @@ LLHUDObject::LLHUDObject(const U8 type) : mVisible = true; mType = type; mDead = false; + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + mbIsHighlighted = false; // Default is off + // [FIRE-35019] } LLHUDObject::~LLHUDObject() diff --git a/indra/newview/llhudobject.h b/indra/newview/llhudobject.h index 8c628e3f92..b823517313 100644 --- a/indra/newview/llhudobject.h +++ b/indra/newview/llhudobject.h @@ -60,6 +60,11 @@ public: bool isVisible() const { return mVisible; } + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + // Accessor methods for indicating if the HUB object is highlighted + void setIsHighlighted(bool isHighlighted) { mbIsHighlighted = isHighlighted; } + bool getIsHighlighted() const { return mbIsHighlighted; } + // [FIRE-35019] U8 getType() const { return mType; } LLVector3d getPositionGlobal() const { return mPositionGlobal; } @@ -111,6 +116,9 @@ protected: U8 mType; bool mDead; bool mVisible; + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + bool mbIsHighlighted; // Flag to determine if the object is currently highlighted by hover + // [FIRE-35019] LLVector3d mPositionGlobal; LLPointer mSourceObject; LLPointer mTargetObject; diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index 15a4c8a69e..b036d5fa67 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -55,6 +55,12 @@ const F32 HORIZONTAL_PADDING = 15.f; const F32 VERTICAL_PADDING = 12.f; const F32 BUFFER_SIZE = 2.f; const F32 HUD_TEXT_MAX_WIDTH = 190.f; +// [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights +const F32 LINE_PADDING = 3.f; // aka "leading" - Taken from LLHUDNameTag +const S32 SHOW_BACKGROUND_NONE = 0; // Default value and disables the LLHUDText background +const S32 SHOW_BACKGROUND_ONLY_HIGHLIGHTED = 1; // Only LLHUDText that is part of the highlighted prim will have a background +const S32 SHOW_BACKGROUND_ALL = 2; // All prims that have a LLHUDText will have a background, but the highlighted prim will have a non-transparent background. +// [FIRE-35019] const F32 HUD_TEXT_MAX_WIDTH_NO_BUBBLE = 1000.f; const F32 MAX_DRAW_DISTANCE = 300.f; @@ -93,11 +99,20 @@ LLHUDText::LLHUDText(const U8 type) : mFadeDistance = gSavedSettings.getF32("FSHudTextFadeDistance"); mFadeRange = gSavedSettings.getF32("FSHudTextFadeRange"); // + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + mLastDistance = 0.0f; // Just to get rid of a compiler warning + // [FIRE-35019] mZCompare = true; mOffscreen = false; mRadius = 0.1f; LLPointer ptr(this); sTextObjects.insert(ptr); + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + mRoundedRectImgp = LLUI::getUIImage("Rounded_Rect"); // Taken from LLHUDNameTag, uses the existing art asset + mBackgroundHeight = 0.0f; // Default background height to 0.0 + mBackgroundOffsetY = 0.0f; // Default background Y offset to 0.0 + mLuminance = 1.0f; // Default luminance is 1.0 as the default color is white (1.0, 1.0, 1.0, 1.0) + // [FIRE-35019] } LLHUDText::~LLHUDText() @@ -108,7 +123,21 @@ void LLHUDText::render() { if (!mOnHUDAttachment && sDisplayText) { - LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + //LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); + // If the current text object is highighed and the use hover highlight feature is enabled, then + // disable writing to the depth buffer + static LLCachedControl mbUseHoverHighlight(gSavedSettings, "FSHudTextUseHoverHighlight"); + if (mbUseHoverHighlight && mbIsHighlighted) + { + LLGLDepthTest gls_depth(GL_FALSE, GL_FALSE); + } + //Else, use the standard method of writing to the depth buffer for all other non-highlighted text objects + else + { + LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); + } + // [FIRE-35019] //LLGLDisable gls_stencil(GL_STENCIL_TEST); renderText(); } @@ -128,7 +157,13 @@ void LLHUDText::renderText() LLColor4 shadow_color(0.f, 0.f, 0.f, 1.f); F32 alpha_factor = 1.f; LLColor4 text_color = mColor; - if (mDoFade) + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + //if (mDoFade) + static LLCachedControl mbUseHoverHighlight(gSavedSettings, "FSHudTextUseHoverHighlight"); // Flag to indicate if hover highlight of prims is enabled + static LLCachedControl mShowBackground(gSavedSettings, "FSHudTextShowBackground"); // Show background values (0 - off, 1 - only highlighted prims, 2 - all prims) + // Support fading the text if the text is not highlighted and only if use hover highlight flag is set + if (mDoFade && (!mbUseHoverHighlight || (mbUseHoverHighlight && !mbIsHighlighted))) + // [FIRE-35019] { // FIRE-17393: Control HUD text fading by options //if (mLastDistance > mFadeDistance) @@ -143,15 +178,43 @@ void LLHUDText::renderText() { return; } + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + //If there is only 1 string and it is blank, don't render as it could add a background on a prim with no text + if ((S32)mTextSegments.size() == 1 && mTextSegments[0].isBlank()) + { + return; + } + // [FIRE-35019] shadow_color.mV[3] = text_color.mV[3]; mOffsetY = lltrunc(mHeight * ((mVertAlignment == ALIGN_VERT_CENTER) ? 0.5f : 1.f)); // *TODO: make this a per-text setting - static LLCachedControl bubble_opacity(gSavedSettings, "ChatBubbleOpacity"); - static LLUIColor nametag_bg_color = LLUIColorTable::instance().getColor("ObjectBubbleColor"); - LLColor4 bg_color = nametag_bg_color; - bg_color.setAlpha(bubble_opacity * alpha_factor); + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + // static LLCachedControl bubble_opacity(gSavedSettings, "ChatBubbleOpacity"); + // static LLUIColor nametag_bg_color = LLUIColorTable::instance().getColor("ObjectBubbleColor"); + // LLColor4 bg_color = nametag_bg_color; + // bg_color.setAlpha(bubble_opacity * alpha_factor); + // Use new background opacity value, independant of the LLHUDNameTag value + static LLCachedControl background_opacity(gSavedSettings, "FSHudTextBackgroundOpacity"); // Can be modified under Preferences->Colors->Floating Text tab + LLColor4 bg_color = LLColor4::black; // Default the background to black color + bg_color.setAlpha(background_opacity * alpha_factor); + // If the show background flag is set, so change the background color depending on the luminance + if (mShowBackground) + { + // If the luminance is below 40%, then use white background color + if (mLuminance <= 0.4f) + { + bg_color.set(LLColor3::white); // Set background color keep the alpha + } + // If hover highlight is enabled and the text object is highlighted then, change the alpha value (Background Opacity if only highlighted objects + // have a background, otherwise, use the alpha value (which should be 1.0)) + if (mbUseHoverHighlight && mbIsHighlighted) + { + bg_color.setAlpha(mShowBackground == SHOW_BACKGROUND_ONLY_HIGHLIGHTED ? background_opacity : alpha_factor); + } + } + // [FIRE-35019] const S32 border_height = 16; const S32 border_width = 16; @@ -199,6 +262,21 @@ void LLHUDText::renderText() F32 y_offset = (F32)mOffsetY; // Render label + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + // Render text window background + // Don't add if the parent object is attached (clothing on player avatar: as some cloths have blank text and render a background...) + // Also, only show the background if it is show all is checked, or if on highlight, only if use hover highlight is enabled. + if ((mShowBackground == SHOW_BACKGROUND_ALL || + mShowBackground == SHOW_BACKGROUND_ONLY_HIGHLIGHTED && mbIsHighlighted && mbUseHoverHighlight) && + (mSourceObject.notNull() && mSourceObject->getAttachmentState() == 0)) + { + LLRect screen_rect; + screen_rect.setCenterAndSize(0, static_cast(lltrunc(-mBackgroundHeight / 2 + mOffsetY + mBackgroundOffsetY)), + static_cast(lltrunc(mWidth)), + static_cast(lltrunc(mBackgroundHeight))); + mRoundedRectImgp->draw3D(render_position, x_pixel_vec, y_pixel_vec, screen_rect, bg_color); + } + // [FIRE-35019] // Render text { @@ -219,7 +297,11 @@ void LLHUDText::renderText() segment_iter != mTextSegments.end(); ++segment_iter ) { const LLFontGL* fontp = segment_iter->mFont; - y_offset -= fontp->getLineHeight() - 1; // correction factor to match legacy font metrics + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + //y_offset -= fontp->getLineHeight() - 1; // correction factor to match legacy font metrics + y_offset -= fontp->getLineHeight(); // Match the same positioning as LLHUDNameTag as the windows don't line up otherwise. + y_offset -= LINE_PADDING; + // [FIRE-35019] U8 style = segment_iter->mStyle; LLFontGL::ShadowType shadow = LLFontGL::DROP_SHADOW; @@ -232,6 +314,10 @@ void LLHUDText::renderText() else // ALIGN_LEFT { x_offset = -0.5f * mWidth + (HORIZONTAL_PADDING / 2.f); + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + // *HACK -> borrowed from LLHUDNameTag to match + x_offset += 1; + // [FIRE-35019] } text_color = segment_iter->mColor; @@ -240,6 +326,13 @@ void LLHUDText::renderText() text_color = linearColor4(text_color); } text_color.mV[VALPHA] *= alpha_factor; + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + // If the text object is highlighted and use hover highlight is enabled, then reset the alpha factor (1.0f) + if (mbUseHoverHighlight && mbIsHighlighted) + { + text_color.mV[VALPHA] = alpha_factor; + } + // [FIRE-35019] hud_render_text(segment_iter->getText(), render_position, *fontp, style, shadow, x_offset, y_offset, text_color, mOnHUDAttachment); } @@ -336,6 +429,13 @@ void LLHUDText::setFont(const LLFontGL* font) void LLHUDText::setColor(const LLColor4 &color) { mColor = color; + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + // Added luminance value for the text color to determine if the background should be white or black + // Based upon https://stackoverflow.com/questions/596216/formula-to-determine-perceived-brightness-of-rgb-color + // used Digital ITU BT.601 (gives more weight to the R and B components): + // Y = 0.299 R + 0.587 G + 0.114 B + mLuminance = 0.299f * mColor.mV[0] + 0.587f * mColor.mV[1] + 0.114f * mColor.mV[2]; + // [FIRE-35019] for (std::vector::iterator segment_iter = mTextSegments.begin(); segment_iter != mTextSegments.end(); ++segment_iter ) { @@ -361,6 +461,15 @@ void LLHUDText::setDoFade(const bool do_fade) void LLHUDText::updateVisibility() { + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + // Create local doFade flag based upon member doFade flag and overide it if the object is highlighted and hover highlight is enabled. + bool doFade = mDoFade; + static LLCachedControl mbUseHoverHighlight(gSavedSettings, "FSHudTextUseHoverHighlight"); + if (mbUseHoverHighlight && mbIsHighlighted) + { + doFade = false; + } + // [FIRE-35019] if (mSourceObject) { mSourceObject->updateText(); @@ -421,7 +530,11 @@ void LLHUDText::updateVisibility() mLastDistance = (mPositionAgent - LLViewerCamera::getInstance()->getOrigin()).magVec(); - if (!mTextSegments.size() || (mDoFade && (mLastDistance > mFadeDistance + mFadeRange))) + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + //if (!mTextSegments.size() || (mDoFade && (mLastDistance > mFadeDistance + mFadeRange))) + // Use local do fade check to allow highlighed objects to force text to be visible + if (!mTextSegments.size() || (doFade && (mLastDistance > mFadeDistance + mFadeRange))) + // [FIRE-35019] { mVisible = false; return; @@ -523,6 +636,14 @@ void LLHUDText::updateSize() F32 height = 0.f; F32 width = 0.f; + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + // We want to create a background that fits just the visible text area only, otherwise a llsetstring('Hello, World\n\n\n') will have a text + // box that covers 4 lines, but only the top line is visible to the user. + // Another example is llsetstring('\n\n\nHello, World'), which would also have a 4 line high window, but the text be visible only on the last line. + F32 backgroundFirstNoneBlankPosition = 0.0f; // Stores the position just above the first non blank line + F32 backgroundLastNoneBlankPosition = 0.0f; // Stores the position just below the last none blank line + bool firstNoneBlank = true; // Flag to determine that if the first blank line has been reached and to store the first none black position + // [FIRE-35019] S32 max_lines = getMaxLines(); S32 start_segment; @@ -533,11 +654,41 @@ void LLHUDText::updateSize() while (iter != mTextSegments.end()) { const LLFontGL* fontp = iter->mFont; - height += fontp->getLineHeight() - 1; // correction factor to match legacy font metrics - width = llmax(width, llmin(iter->getWidth(fontp), HUD_TEXT_MAX_WIDTH)); + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + //height += fontp->getLineHeight() - 1; // correction factor to match legacy font metrics + //width = llmax(width, llmin(iter->getWidth(fontp), HUD_TEXT_MAX_WIDTH)); + + //If there is no blank on the current line, skip over it so that we don't make the window cover the empty space above or below a blank text box. + if (!iter->isBlank()) + { + //If this is the first line without a blank, get the height above current line (0.0 for line 1, previous height if not the first line + if (firstNoneBlank) + { + backgroundFirstNoneBlankPosition = height; + firstNoneBlank = false; + } + //Always get the position below the non-blank line + backgroundLastNoneBlankPosition = height + fontp->getLineHeight() + LINE_PADDING; + } + // + height += fontp->getLineHeight(); // Taken from LLHUBNameTa::UpdateSize + height += LINE_PADDING; // Taken from LLHUBNameTa::UpdateSize + // The max width of the text is set to HUD_TEXT_MAX_WIDTH_NO_BUBBLE and not HUD_TEXT_MAX_WIDTH, so the window would be limited but the text could spill over... + width = llmax(width, llmin(iter->getWidth(fontp), HUD_TEXT_MAX_WIDTH_NO_BUBBLE)); + // [FIRE-35019] ++iter; } + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + // Don't want line spacing under the last line (Taken from LLHUBNameTa::UpdateSize) + if (height > 0.f) + { + height -= LINE_PADDING; + // Also update the background last non blank position by the LINE_PADDING + backgroundLastNoneBlankPosition -= LINE_PADDING; + } + // [FIRE-35019] + if (width == 0.f) { return; @@ -550,6 +701,11 @@ void LLHUDText::updateSize() F32 u = 1.f; mWidth = llmax(width, lerp(mWidth, (F32)width, u)); mHeight = llmax(height, lerp(mHeight, (F32)height, u)); + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + backgroundLastNoneBlankPosition += VERTICAL_PADDING; // Add the vertical padding to the last non-blank position + mBackgroundOffsetY = backgroundFirstNoneBlankPosition; // Set the background Y offset to the top of the first blank + mBackgroundHeight = backgroundLastNoneBlankPosition - backgroundFirstNoneBlankPosition; // Set the background height to the difference between the top of the first non-blank, and bottom of the last non-blank line + // [FIRE-35019] } void LLHUDText::updateAll() diff --git a/indra/newview/llhudtext.h b/indra/newview/llhudtext.h index 3130dbf271..f1327632f1 100644 --- a/indra/newview/llhudtext.h +++ b/indra/newview/llhudtext.h @@ -59,11 +59,30 @@ protected: mStyle(style), mText(text), mFont(font) - {} + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + //{} + { + // Added a bool check to see if the current line is blank (empty, or has only a single space character stored. + // There are issues with users using "Hello World \n \n \n \n" as strings which would create a 4 text segments, but only 1 had actual text + // and the background would cover all 4, and would not look nice. So store a flag on each segment to see if it is blank, so we don't have to + // do the check every frame for every text segment. + if (text.length() == 0 || text.find_first_not_of(utf8str_to_wstring(" "), 0) == std::string::npos) + { + mbIsBlank = true; + } + else + { + mbIsBlank = false; + } + } + // [FIRE-35019] F32 getWidth(const LLFontGL* font); const LLWString& getText() const { return mText; } void clearFontWidthMap() { mFontWidthMap.clear(); } + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + bool isBlank() { return mbIsBlank; } // Accessor method for checking to see if the current Text Segment is blank + // [FIRE-35019] LLColor4 mColor; LLFontGL::StyleFlags mStyle; const LLFontGL* mFont; @@ -71,6 +90,9 @@ protected: private: LLWString mText; std::map mFontWidthMap; + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + bool mbIsBlank; // True if mText length is 0, or only contains " " characters, otherwise false + // [FIRE-35019] }; public: @@ -178,6 +200,12 @@ private: std::string mObjText; // [/RLVa:KB] + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + LLPointer mRoundedRectImgp; // Added background rect image from LLHUDNameTag + F32 mBackgroundHeight; // Store the actual height of the background image (calculated from the visible text segments) + F32 mBackgroundOffsetY; // Store the offset of the top of the first visible text segment + F32 mLuminance; // Store the luminance of the text (used to determine if the background should be white or black for higher contrast) + // [FIRE-35019] static bool sDisplayText ; static std::set > sTextObjects; static std::vector > sVisibleTextObjects; diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index c5eb17e125..ef7bf02882 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -848,6 +848,26 @@ void LLToolPie::selectionPropertiesReceived() bool LLToolPie::handleHover(S32 x, S32 y, MASK mask) { bool pick_rigged = false; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick"); + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + // We want to unhighlight the previous hover object's parent before we get the next hover pick and lose the reference + // (Possible optimization - check if the current object and previous ones are the same, and if so, don't set the text is highlighed flag to false) + LLViewerObject* oldObject = NULL; + LLViewerObject* oldParent = NULL; + // If the previous mHoverPick object is valid, then try to set the Text Is Highlighted flag to false to clear it. + if (mHoverPick.isValid()) + { + oldObject = mHoverPick.getObject(); + if (oldObject) + { + oldParent = oldObject->getRootEdit(); + if (oldParent) + { + // We want to set the parent object's flag to false, and it will recursively change until it finds a valid mText object. + oldParent->setTextIsHighlighted(false); + } + } + } + // [FIRE-35019] mHoverPick = gViewerWindow->pickImmediate(x, y, false, pick_rigged); LLViewerObject *parent = NULL; LLViewerObject *object = mHoverPick.getObject(); @@ -940,6 +960,17 @@ bool LLToolPie::handleHover(S32 x, S32 y, MASK mask) { LLViewerMediaFocus::getInstance()->clearHover(); } + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + // If there is an object that was hovered over, set the root of the object to have the text highlighted. + // This will work if the parent does not have a LLHUDText object, but a child does. + else + { + if (parent) + { + parent->setTextIsHighlighted(true); + } + } + // [FIRE-35019] return true; } diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 9b28e39185..38b3c5d31e 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -6141,6 +6141,36 @@ void LLViewerObject::updateText() } } +// [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights +// Method that sets the current viewer object's mText to be highlighted or the objects children if there is no mText. +void LLViewerObject::setTextIsHighlighted(bool is_highlighted) +{ + // If the object it not dead, try to set the highlight value + if (!isDead()) + { + // Check to see if the current LLHUDText object is not null, most of the time the root object contains the floating text. + if (mText.notNull()) + { + mText->setIsHighlighted(is_highlighted); + } + // But in case the current object does not, try to set all the children to use the flag + else + { + // Else, there may be children with the LLHUDText objects.. + for (child_list_t::const_iterator iter = mChildList.begin(); iter != mChildList.end(); iter++) + { + LLViewerObject* child = *iter; + // If the child is not an avatar, then try to set it's text is highlighed flag, which should recussivly get to all sub children. (Kind of hope not a lot of prims with this setup) + if (!child->isAvatar()) + { + child->setTextIsHighlighted(is_highlighted); + } + } + } + } +} +// [FIRE-35019] + bool LLViewerObject::isOwnerInMuteList(LLUUID id) { LLUUID owner_id = id.isNull() ? mOwnerID : id; diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index e5a62b080f..75be338067 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -498,6 +498,10 @@ public: void updatePositionCaches() const; // Update the global and region position caches from the object (and parent's) xform. void updateText(); // update text label position + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + // Method that sets the current viewer object's mText to be highlighted or the objects children if there is no mText. + void setTextIsHighlighted(bool is_highlighted); + // [FIRE-35019] virtual void updateDrawable(bool force_damped); // force updates on static objects bool isOwnerInMuteList(LLUUID item_id = LLUUID()); diff --git a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml index 7019b57a72..bef797947b 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml @@ -201,6 +201,21 @@ width="80"> seconds + + + + Floating Text Options: + + + + + + Show floating text background: + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/panel_preferences_colors.xml b/indra/newview/skins/default/xui/en/panel_preferences_colors.xml index 27bf9fb8a5..6eedafe3de 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_colors.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_colors.xml @@ -1202,6 +1202,36 @@ + + + + + + +