From 717a4800f1ae0ae6ea0bbe9ed0af21c7851f5d0a Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 9 Mar 2010 14:28:48 -0800 Subject: Break name tag code out into LLHUDNameTag Start by duplicating the LLHUDText code, then stripping out functionality that only needs to exist in one place (like force-based juggling of name tag positions) --- indra/newview/llhudobject.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'indra/newview/llhudobject.cpp') diff --git a/indra/newview/llhudobject.cpp b/indra/newview/llhudobject.cpp index dc55aba0db..73fa987f3b 100644 --- a/indra/newview/llhudobject.cpp +++ b/indra/newview/llhudobject.cpp @@ -30,9 +30,6 @@ * $/LicenseInfo$ */ -// llhudobject.cpp -// Copyright 2002, Linden Research, Inc. - #include "llviewerprecompiledheaders.h" #include "llhudobject.h" @@ -43,7 +40,7 @@ #include "llhudeffectbeam.h" #include "llhudeffecttrail.h" #include "llhudeffectlookat.h" - +#include "llhudnametag.h" #include "llvoicevisualizer.h" #include "llagent.h" @@ -71,7 +68,6 @@ LLHUDObject::LLHUDObject(const U8 type) : mVisible = TRUE; mType = type; mDead = FALSE; - mOnHUDAttachment = FALSE; } LLHUDObject::~LLHUDObject() @@ -150,6 +146,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; } @@ -262,6 +261,7 @@ void LLHUDObject::updateAll() LLFastTimer ftm(FTM_HUD_UPDATE); LLHUDText::updateAll(); LLHUDIcon::updateAll(); + LLHUDNameTag::updateAll(); sortObjects(); } @@ -309,6 +309,14 @@ void LLHUDObject::renderAllForSelect() } } +// static +void LLHUDObject::reshapeAll() +{ + // only hud objects that use fonts care about window size/scale changes + LLHUDText::reshape(); + LLHUDNameTag::reshape(); +} + // static void LLHUDObject::sortObjects() { -- cgit v1.2.3 From 393c819477b268aa0a05ec0a006e1dba27d6e6c6 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Sun, 10 Oct 2010 15:25:11 +0100 Subject: VWR-21967 There's lots of ::renderForSelect() code that we don't need any more. VWR-22088 Remove underlying ::renderForSelect() code (render-pipeline) --- indra/newview/llhudobject.cpp | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'indra/newview/llhudobject.cpp') diff --git a/indra/newview/llhudobject.cpp b/indra/newview/llhudobject.cpp index 3e814a0773..b74f719b16 100644 --- a/indra/newview/llhudobject.cpp +++ b/indra/newview/llhudobject.cpp @@ -283,27 +283,6 @@ void LLHUDObject::renderAll() LLVertexBuffer::unbind(); } -// static -void LLHUDObject::renderAllForSelect() -{ - 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->renderForSelect(); - } - } -} - // static void LLHUDObject::renderAllForTimer() { -- cgit v1.2.3