summaryrefslogtreecommitdiff
path: root/indra/newview/llhudobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llhudobject.cpp')
-rw-r--r--indra/newview/llhudobject.cpp37
1 files changed, 12 insertions, 25 deletions
diff --git a/indra/newview/llhudobject.cpp b/indra/newview/llhudobject.cpp
index 3e814a0773..5e762ee037 100644
--- a/indra/newview/llhudobject.cpp
+++ b/indra/newview/llhudobject.cpp
@@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
* Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
+ * Copyright (C) 2002-2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -24,9 +24,6 @@
* $/LicenseInfo$
*/
-// llhudobject.cpp
-// Copyright 2002, Linden Research, Inc.
-
#include "llviewerprecompiledheaders.h"
#include "llhudobject.h"
@@ -38,7 +35,7 @@
#include "llhudeffecttrail.h"
#include "llhudeffectlookat.h"
#include "llhudeffectpointat.h"
-
+#include "llhudnametag.h"
#include "llvoicevisualizer.h"
#include "llagent.h"
@@ -66,7 +63,6 @@ LLHUDObject::LLHUDObject(const U8 type) :
mVisible = TRUE;
mType = type;
mDead = FALSE;
- mOnHUDAttachment = FALSE;
}
LLHUDObject::~LLHUDObject()
@@ -145,6 +141,9 @@ LLHUDObject *LLHUDObject::addHUDObject(const U8 type)
case LL_HUD_ICON:
hud_objectp = new LLHUDIcon(type);
break;
+ case LL_HUD_NAME_TAG:
+ hud_objectp = new LLHUDNameTag(type);
+ break;
default:
llwarns << "Unknown type of hud object:" << (U32) type << llendl;
}
@@ -257,6 +256,7 @@ void LLHUDObject::updateAll()
LLFastTimer ftm(FTM_HUD_UPDATE);
LLHUDText::updateAll();
LLHUDIcon::updateAll();
+ LLHUDNameTag::updateAll();
sortObjects();
}
@@ -284,7 +284,7 @@ void LLHUDObject::renderAll()
}
// static
-void LLHUDObject::renderAllForSelect()
+void LLHUDObject::renderAllForTimer()
{
LLHUDObject *hud_objp;
@@ -299,30 +299,17 @@ void LLHUDObject::renderAllForSelect()
}
else if (hud_objp->isVisible())
{
- hud_objp->renderForSelect();
+ hud_objp->renderForTimer();
}
}
}
// static
-void LLHUDObject::renderAllForTimer()
+void LLHUDObject::reshapeAll()
{
- LLHUDObject *hud_objp;
-
- hud_object_list_t::iterator object_it;
- for (object_it = sHUDObjects.begin(); object_it != sHUDObjects.end(); )
- {
- hud_object_list_t::iterator cur_it = object_it++;
- hud_objp = (*cur_it);
- if (hud_objp->getNumRefs() == 1)
- {
- sHUDObjects.erase(cur_it);
- }
- else if (hud_objp->isVisible())
- {
- hud_objp->renderForTimer();
- }
- }
+ // only hud objects that use fonts care about window size/scale changes
+ LLHUDText::reshape();
+ LLHUDNameTag::reshape();
}
// static