aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llhudtext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llhudtext.cpp')
-rw-r--r--linden/indra/newview/llhudtext.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/linden/indra/newview/llhudtext.cpp b/linden/indra/newview/llhudtext.cpp
index 661a786..7d9f7f9 100644
--- a/linden/indra/newview/llhudtext.cpp
+++ b/linden/indra/newview/llhudtext.cpp
@@ -292,9 +292,14 @@ void LLHUDText::renderText(BOOL for_select)
292 // *TODO: cache this image 292 // *TODO: cache this image
293 LLUIImagePtr imagep = LLUI::getUIImage("rounded_square.tga"); 293 LLUIImagePtr imagep = LLUI::getUIImage("rounded_square.tga");
294 294
295 static LLColor4* sBackgroundChatColor = rebind_llcontrol<LLColor4>("BackgroundChatColor", &gSavedSettings, true);
296
295 // *TODO: make this a per-text setting 297 // *TODO: make this a per-text setting
296 LLColor4 bg_color = gSavedSettings.getColor4("BackgroundChatColor"); 298 LLColor4 bg_color = *sBackgroundChatColor;
297 bg_color.setAlpha(gSavedSettings.getF32("ChatBubbleOpacity") * alpha_factor); 299
300 static F32* sChatBubbleOpacity = rebind_llcontrol<F32>("ChatBubbleOpacity", &gSavedSettings, true);
301
302 bg_color.setAlpha(*sChatBubbleOpacity * alpha_factor);
298 303
299 const S32 border_height = 16; 304 const S32 border_height = 16;
300 const S32 border_width = 16; 305 const S32 border_width = 16;
@@ -394,7 +399,7 @@ void LLHUDText::renderText(BOOL for_select)
394 { 399 {
395 LLUI::pushMatrix(); 400 LLUI::pushMatrix();
396 { 401 {
397 gGL.color4f(text_color.mV[VX], text_color.mV[VY], text_color.mV[VZ], gSavedSettings.getF32("ChatBubbleOpacity") * alpha_factor); 402 gGL.color4f(text_color.mV[VX], text_color.mV[VY], text_color.mV[VZ], *sChatBubbleOpacity * alpha_factor);
398 LLVector3 label_height = (mFontp->getLineHeight() * mLabelSegments.size() + (VERTICAL_PADDING / 3.f)) * y_pixel_vec; 403 LLVector3 label_height = (mFontp->getLineHeight() * mLabelSegments.size() + (VERTICAL_PADDING / 3.f)) * y_pixel_vec;
399 LLVector3 label_offset = height_vec - label_height; 404 LLVector3 label_offset = height_vec - label_height;
400 LLUI::translate(label_offset.mV[VX], label_offset.mV[VY], label_offset.mV[VZ]); 405 LLUI::translate(label_offset.mV[VX], label_offset.mV[VY], label_offset.mV[VZ]);