From 6e471d395fdec324164469e54613ae9bf30e1e9f Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 4 Oct 2010 16:38:03 -0700 Subject: removed dead code --- indra/newview/llhudtext.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index 96638018c4..99a0da8b01 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -326,9 +326,6 @@ void LLHUDText::renderText(BOOL for_select) mRadius = (width_vec + height_vec).magVec() * 0.5f; - LLCoordGL screen_pos; - LLViewerCamera::getInstance()->projectPosAgentToScreen(mPositionAgent, screen_pos, FALSE); - LLVector2 screen_offset; if (!mUseBubble) { -- cgit v1.2.3 From 5e0e86869dcb0c365c486776f8dacba14a029d1e Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 4 Oct 2010 18:38:38 -0700 Subject: EXP-138 WIP Chat and IM notices not aligned with Bottom bar in Skylight Viewer --- indra/newview/llnearbychathandler.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 47d32e57fb..f06f4eab28 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -336,7 +336,12 @@ void LLNearbyChatScreenChannel::showToastsBottom() return; LLRect toast_rect; - S32 bottom = getRect().mBottom; + S32 channel_bottom = gViewerWindow->getWorldViewRectScaled().mBottom + gSavedSettings.getS32("ChannelBottomPanelMargin"); + LLRect cur_rect = getRect(); + cur_rect.translate(0, channel_bottom - cur_rect.mBottom); + setRect(cur_rect); + + S32 bottom = channel_bottom; S32 margin = gSavedSettings.getS32("ToastGap"); //sort active toasts -- cgit v1.2.3 From 52d3f86438925d5d9509d93b162ea8915e1caad7 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 4 Oct 2010 18:39:09 -0700 Subject: fixed merging of textures.xml between current skin and base now possible to define new textures in current skin --- indra/newview/llviewertexturelist.cpp | 74 ++++++++++++++++++----------------- 1 file changed, 39 insertions(+), 35 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index bbf7c8e60e..06c218ad94 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1513,42 +1513,45 @@ bool LLUIImageList::initFromFile() return false; } - std::vector paths; - // path to current selected skin - paths.push_back(gDirUtilp->getSkinDir() - + gDirUtilp->getDirDelimiter() - + "textures" - + gDirUtilp->getDirDelimiter() - + "textures.xml"); - // path to user overrides on current skin - paths.push_back(gDirUtilp->getUserSkinDir() - + gDirUtilp->getDirDelimiter() - + "textures" - + gDirUtilp->getDirDelimiter() - + "textures.xml"); - - // apply skinned xml files incrementally - for(std::vector::iterator path_it = paths.begin(); - path_it != paths.end(); - ++path_it) - { - // don't reapply base file to itself - if (!path_it->empty() && (*path_it) != base_file_path) - { - LLXMLNodePtr update_root; - if (LLXMLNode::parseFile(*path_it, update_root, NULL)) - { - LLXMLNode::updateNode(root, update_root); - } - } - } - UIImageDeclarations images; LLXUIParser parser; parser.readXUI(root, images, base_file_path); + // add components defined in current skin + std::string skin_update_path = gDirUtilp->getSkinDir() + + gDirUtilp->getDirDelimiter() + + "textures" + + gDirUtilp->getDirDelimiter() + + "textures.xml"; + LLXMLNodePtr update_root; + if (skin_update_path != base_file_path + && LLXMLNode::parseFile(skin_update_path, update_root, NULL)) + { + parser.readXUI(update_root, images, skin_update_path); + } + + // add components defined in user override of current skin + skin_update_path = gDirUtilp->getUserSkinDir() + + gDirUtilp->getDirDelimiter() + + "textures" + + gDirUtilp->getDirDelimiter() + + "textures.xml"; + if (skin_update_path != base_file_path + && LLXMLNode::parseFile(skin_update_path, update_root, NULL)) + { + parser.readXUI(update_root, images, skin_update_path); + } + if (!images.validateBlock()) return false; + std::map merged_declarations; + for (LLInitParam::ParamIterator::const_iterator image_it = images.textures.begin(); + image_it != images.textures.end(); + ++image_it) + { + merged_declarations[image_it->name].overwriteFrom(*image_it); + } + enum e_decode_pass { PASS_DECODE_NOW, @@ -1558,19 +1561,20 @@ bool LLUIImageList::initFromFile() for (S32 cur_pass = PASS_DECODE_NOW; cur_pass < NUM_PASSES; cur_pass++) { - for (LLInitParam::ParamIterator::const_iterator image_it = images.textures.begin(); - image_it != images.textures.end(); + for (std::map::const_iterator image_it = merged_declarations.begin(); + image_it != merged_declarations.end(); ++image_it) { - std::string file_name = image_it->file_name.isProvided() ? image_it->file_name() : image_it->name(); + const UIImageDeclaration& image = image_it->second; + std::string file_name = image.file_name.isProvided() ? image.file_name() : image.name(); // load high priority textures on first pass (to kick off decode) - enum e_decode_pass decode_pass = image_it->preload ? PASS_DECODE_NOW : PASS_DECODE_LATER; + enum e_decode_pass decode_pass = image.preload ? PASS_DECODE_NOW : PASS_DECODE_LATER; if (decode_pass != cur_pass) { continue; } - preloadUIImage(image_it->name, file_name, image_it->use_mips, image_it->scale); + preloadUIImage(image.name, file_name, image.use_mips, image.scale); } if (cur_pass == PASS_DECODE_NOW && !gSavedSettings.getBOOL("NoPreload")) -- cgit v1.2.3