summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRichard Nelson <none@none>2010-10-04 18:39:30 -0700
committerRichard Nelson <none@none>2010-10-04 18:39:30 -0700
commit9e69af82b00141e82293656c6655ecfdba457e4a (patch)
tree7cd7bd847d303e19a33b8ef792426f9da233fc99 /indra
parentd91d48bb4c65924d4bfa8c81969df25f2efb0f28 (diff)
parent52d3f86438925d5d9509d93b162ea8915e1caad7 (diff)
merge
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llhudtext.cpp3
-rw-r--r--indra/newview/llnearbychathandler.cpp7
-rw-r--r--indra/newview/llviewertexturelist.cpp74
3 files changed, 45 insertions, 39 deletions
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)
{
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
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<std::string> 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<std::string>::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<std::string, UIImageDeclaration> merged_declarations;
+ for (LLInitParam::ParamIterator<UIImageDeclaration>::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<UIImageDeclaration>::const_iterator image_it = images.textures.begin();
- image_it != images.textures.end();
+ for (std::map<std::string, UIImageDeclaration>::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"))