diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 66c206a48d..c5c70b92d1 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -25106,7 +25106,7 @@ 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 diff --git a/indra/newview/llhudobject.cpp b/indra/newview/llhudobject.cpp index e0d6f55c1c..1fbdc47ff1 100644 --- a/indra/newview/llhudobject.cpp +++ b/indra/newview/llhudobject.cpp @@ -52,7 +52,7 @@ struct hud_object_further_away bool hud_object_further_away::operator()(const LLPointer& lhs, const LLPointer& rhs) const { - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [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"); @@ -83,7 +83,7 @@ LLHUDObject::LLHUDObject(const U8 type) : mVisible = true; mType = type; mDead = false; - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights mbIsHighlighted = false; // Default is off // [FIRE-35019] } diff --git a/indra/newview/llhudobject.h b/indra/newview/llhudobject.h index 39cb115204..b823517313 100644 --- a/indra/newview/llhudobject.h +++ b/indra/newview/llhudobject.h @@ -60,7 +60,7 @@ public: bool isVisible() const { return mVisible; } - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [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; } @@ -116,7 +116,7 @@ protected: U8 mType; bool mDead; bool mVisible; - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [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; diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index 83d15f19b7..b036d5fa67 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -55,11 +55,11 @@ 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 LLHUBNameTag background to floating text and hover highlights -const F32 LINE_PADDING = 3.f; // aka "leading" - Taken from LLHUBNameTag -const S32 SHOW_BACKGROUND_NONE = 0; // Default value and disables the LLHUBText background -const S32 SHOW_BACKGROUND_ONLY_HIGHLIGHTED = 1; // Only LLHUBText that is part of the highlighted prim will have a background -const S32 SHOW_BACKGROUND_ALL = 2; // All prims that have a LLHUBText will have a background, but the highlighted prim will have a non-transparent background. +// [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; @@ -99,7 +99,7 @@ LLHUDText::LLHUDText(const U8 type) : mFadeDistance = gSavedSettings.getF32("FSHudTextFadeDistance"); mFadeRange = gSavedSettings.getF32("FSHudTextFadeRange"); // - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [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; @@ -107,8 +107,8 @@ LLHUDText::LLHUDText(const U8 type) : mRadius = 0.1f; LLPointer ptr(this); sTextObjects.insert(ptr); - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights - mRoundedRectImgp = LLUI::getUIImage("Rounded_Rect"); // Taken from LLHUBNameTag, uses the existing art asset + // [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) @@ -123,7 +123,7 @@ void LLHUDText::render() { if (!mOnHUDAttachment && sDisplayText) { - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [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 @@ -157,7 +157,7 @@ void LLHUDText::renderText() LLColor4 shadow_color(0.f, 0.f, 0.f, 1.f); F32 alpha_factor = 1.f; LLColor4 text_color = mColor; - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [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) @@ -178,7 +178,7 @@ void LLHUDText::renderText() { return; } - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [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()) { @@ -190,12 +190,12 @@ void LLHUDText::renderText() mOffsetY = lltrunc(mHeight * ((mVertAlignment == ALIGN_VERT_CENTER) ? 0.5f : 1.f)); // *TODO: make this a per-text setting - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [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 LLHUBNameTag value + // 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); @@ -262,7 +262,7 @@ void LLHUDText::renderText() F32 y_offset = (F32)mOffsetY; // Render label - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [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. @@ -297,9 +297,9 @@ void LLHUDText::renderText() segment_iter != mTextSegments.end(); ++segment_iter ) { const LLFontGL* fontp = segment_iter->mFont; - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [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 LLHUBNameTag as the windows don't line up otherwise. + y_offset -= fontp->getLineHeight(); // Match the same positioning as LLHUDNameTag as the windows don't line up otherwise. y_offset -= LINE_PADDING; // [FIRE-35019] @@ -314,8 +314,8 @@ void LLHUDText::renderText() else // ALIGN_LEFT { x_offset = -0.5f * mWidth + (HORIZONTAL_PADDING / 2.f); - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights - // *HACK -> borrowed from LLHUBNameTag to match + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + // *HACK -> borrowed from LLHUDNameTag to match x_offset += 1; // [FIRE-35019] } @@ -326,7 +326,7 @@ void LLHUDText::renderText() text_color = linearColor4(text_color); } text_color.mV[VALPHA] *= alpha_factor; - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [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) { @@ -429,7 +429,7 @@ void LLHUDText::setFont(const LLFontGL* font) void LLHUDText::setColor(const LLColor4 &color) { mColor = color; - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [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): @@ -461,7 +461,7 @@ void LLHUDText::setDoFade(const bool do_fade) void LLHUDText::updateVisibility() { - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [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"); @@ -530,7 +530,7 @@ void LLHUDText::updateVisibility() mLastDistance = (mPositionAgent - LLViewerCamera::getInstance()->getOrigin()).magVec(); - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [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))) @@ -636,7 +636,7 @@ void LLHUDText::updateSize() F32 height = 0.f; F32 width = 0.f; - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [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. @@ -654,7 +654,7 @@ void LLHUDText::updateSize() while (iter != mTextSegments.end()) { const LLFontGL* fontp = iter->mFont; - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [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)); @@ -679,7 +679,7 @@ void LLHUDText::updateSize() ++iter; } - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [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) { @@ -701,7 +701,7 @@ 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 LLHUBNameTag background to floating text and hover highlights + // [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 diff --git a/indra/newview/llhudtext.h b/indra/newview/llhudtext.h index bf22873e01..f1327632f1 100644 --- a/indra/newview/llhudtext.h +++ b/indra/newview/llhudtext.h @@ -59,7 +59,7 @@ protected: mStyle(style), mText(text), mFont(font) - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [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. @@ -80,7 +80,7 @@ protected: const LLWString& getText() const { return mText; } void clearFontWidthMap() { mFontWidthMap.clear(); } - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [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; @@ -90,7 +90,7 @@ protected: private: LLWString mText; std::map mFontWidthMap; - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [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] }; @@ -200,8 +200,8 @@ private: std::string mObjText; // [/RLVa:KB] - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights - LLPointer mRoundedRectImgp; // Added background rect image from LLHUBNameTag + // [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) diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index b06c190d4a..ef7bf02882 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -848,7 +848,7 @@ void LLToolPie::selectionPropertiesReceived() bool LLToolPie::handleHover(S32 x, S32 y, MASK mask) { bool pick_rigged = false; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick"); - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [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; @@ -960,9 +960,9 @@ bool LLToolPie::handleHover(S32 x, S32 y, MASK mask) { LLViewerMediaFocus::getInstance()->clearHover(); } - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [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 LLHUBText object, but a child does. + // This will work if the parent does not have a LLHUDText object, but a child does. else { if (parent) diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index fff7cc561f..38b3c5d31e 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -6141,14 +6141,14 @@ void LLViewerObject::updateText() } } -// [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights +// [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 LLHUBText object is not null, most of the time the root object contains the floating text. + // 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); @@ -6156,7 +6156,7 @@ void LLViewerObject::setTextIsHighlighted(bool 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 LLHUBText objects.. + // 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; diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 2db3b171bb..75be338067 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -498,7 +498,7 @@ 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 LLHUBNameTag background to floating text and hover highlights + // [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] 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 81c123d84e..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,7 +201,7 @@ width="80"> seconds - + - + - +