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.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/indra/newview/llhudobject.cpp b/indra/newview/llhudobject.cpp
index b74f719b16..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();
}
@@ -305,6 +305,14 @@ void LLHUDObject::renderAllForTimer()
}
// static
+void LLHUDObject::reshapeAll()
+{
+ // only hud objects that use fonts care about window size/scale changes
+ LLHUDText::reshape();
+ LLHUDNameTag::reshape();
+}
+
+// static
void LLHUDObject::sortObjects()
{
sHUDObjects.sort(hud_object_further_away());