diff options
Diffstat (limited to 'indra/newview/llhudtext.cpp')
-rw-r--r-- | indra/newview/llhudtext.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index 5ee0ab437d..92f09c34a0 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -138,8 +138,10 @@ void LLHUDText::renderText() mOffsetY = lltrunc(mHeight * ((mVertAlignment == ALIGN_VERT_CENTER) ? 0.5f : 1.f)); // *TODO: make this a per-text setting - LLColor4 bg_color = LLUIColorTable::instance().getColor("ObjectBubbleColor"); - bg_color.setAlpha(gSavedSettings.getF32("ChatBubbleOpacity") * alpha_factor); + static LLCachedControl<F32> 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); const S32 border_height = 16; const S32 border_width = 16; @@ -229,7 +231,7 @@ void LLHUDText::renderText() } text_color.mV[VALPHA] *= alpha_factor; - hud_render_text(segment_iter->getText(), render_position, *fontp, style, shadow, x_offset, y_offset, text_color, mOnHUDAttachment); + hud_render_text(segment_iter->getText(), render_position, &mFontBuffer, *fontp, style, shadow, x_offset, y_offset, text_color, mOnHUDAttachment); } } /// Reset the default color to white. The renderer expects this to be the default. @@ -392,7 +394,8 @@ void LLHUDText::updateVisibility() LLVector3 pos_agent_center = gAgent.getPosAgentFromGlobal(mPositionGlobal) - dir_from_camera; F32 last_distance_center = (pos_agent_center - LLViewerCamera::getInstance()->getOrigin()).magVec(); - F32 max_draw_distance = gSavedSettings.getF32("PrimTextMaxDrawDistance"); + static LLCachedControl<F32> prim_text_max_dist(gSavedSettings, "PrimTextMaxDrawDistance"); + F32 max_draw_distance = prim_text_max_dist; if(max_draw_distance < 0) { |