summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llhudnametag.cpp43
-rw-r--r--indra/newview/llhudnametag.h14
-rw-r--r--indra/newview/llhudtext.cpp26
-rw-r--r--indra/newview/llhudtext.h4
-rw-r--r--indra/newview/llvoavatar.cpp2
5 files changed, 43 insertions, 46 deletions
diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp
index 7d194cc330..ebc6472a81 100644
--- a/indra/newview/llhudnametag.cpp
+++ b/indra/newview/llhudnametag.cpp
@@ -85,27 +85,33 @@ bool llhudnametag_further_away::operator()(const LLPointer<LLHUDNameTag>& lhs, c
LLHUDNameTag::LLHUDNameTag(const U8 type)
: LLHUDObject(type),
-// mUseBubble(FALSE),
+ mDoFade(TRUE),
+ mFadeDistance(8.f),
+ mFadeRange(4.f),
+ mLastDistance(0.f),
+ mZCompare(TRUE),
mVisibleOffScreen(FALSE),
+ mOffscreen(FALSE),
+ mColor(1.f, 1.f, 1.f, 1.f),
+// mScale(),
mWidth(0.f),
mHeight(0.f),
mFontp(LLFontGL::getFontSansSerifSmall()),
mBoldFontp(LLFontGL::getFontSansSerifBold()),
- mMass(1.f),
+ mSoftScreenRect(),
+ mPositionAgent(),
+ mPositionOffset(),
+ mMass(10.f),
mMaxLines(10),
mOffsetY(0),
+ mRadius(0.1f),
+ mTextSegments(),
+ mLabelSegments(),
mTextAlignment(ALIGN_TEXT_CENTER),
mVertAlignment(ALIGN_VERT_CENTER),
mLOD(0),
mHidden(FALSE)
{
- mColor = LLColor4(1.f, 1.f, 1.f, 1.f);
- mDoFade = TRUE;
- mFadeDistance = 8.f;
- mFadeRange = 4.f;
- mZCompare = TRUE;
- mOffscreen = FALSE;
- mRadius = 0.1f;
LLPointer<LLHUDNameTag> ptr(this);
sTextObjects.insert(ptr);
}
@@ -808,20 +814,11 @@ void LLHUDNameTag::updateSize()
width += HORIZONTAL_PADDING;
height += VERTICAL_PADDING;
- if (!mResizeTimer.getStarted() && (width != mWidth || height != mHeight))
- {
- mResizeTimer.start();
- }
-
- // *NOTE: removed logic which did a divide by zero.
- F32 u = 1.f;//llclamp(mResizeTimer.getElapsedTimeF32() / RESIZE_TIME, 0.f, 1.f);
- if (u == 1.f)
- {
- mResizeTimer.stop();
- }
-
- mWidth = llmax(width, lerp(mWidth, (F32)width, u));
- mHeight = llmax(height, lerp(mHeight, (F32)height, u));
+ // *TODO: Could do a timer-based resize here
+ //mWidth = llmax(width, lerp(mWidth, (F32)width, u));
+ //mHeight = llmax(height, lerp(mHeight, (F32)height, u));
+ mWidth = width;
+ mHeight = height;
}
void LLHUDNameTag::updateAll()
diff --git a/indra/newview/llhudnametag.h b/indra/newview/llhudnametag.h
index 0b741057e5..9a92307009 100644
--- a/indra/newview/llhudnametag.h
+++ b/indra/newview/llhudnametag.h
@@ -38,10 +38,10 @@
#include "llhudobject.h"
#include "v4color.h"
-#include "v4coloru.h"
+//#include "v4coloru.h"
#include "v2math.h"
#include "llrect.h"
-#include "llframetimer.h"
+//#include "llframetimer.h"
#include "llfontgl.h"
#include <set>
#include <vector>
@@ -118,7 +118,7 @@ public:
void updateVisibility();
LLVector2 updateScreenPos(LLVector2 &offset_target);
void updateSize();
- void setMass(F32 mass) { mMass = llmax(0.1f, mass); }
+// void setMass(F32 mass) { mMass = llmax(0.1f, mass); }
void setTextAlignment(ETextAlignment alignment) { mTextAlignment = alignment; }
void setVertAlignment(EVertAlignment alignment) { mVertAlignment = alignment; }
/*virtual*/ void markDead();
@@ -158,10 +158,10 @@ private:
BOOL mVisibleOffScreen;
BOOL mOffscreen;
LLColor4 mColor;
- LLVector3 mScale;
+// LLVector3 mScale;
F32 mWidth;
F32 mHeight;
- LLColor4U mPickColor;
+// LLColor4U mPickColor;
const LLFontGL* mFontp;
const LLFontGL* mBoldFontp;
LLRectf mSoftScreenRect;
@@ -174,7 +174,7 @@ private:
F32 mRadius;
std::vector<LLHUDTextSegment> mTextSegments;
std::vector<LLHUDTextSegment> mLabelSegments;
- LLFrameTimer mResizeTimer;
+// LLFrameTimer mResizeTimer;
ETextAlignment mTextAlignment;
EVertAlignment mVertAlignment;
S32 mLOD;
@@ -183,7 +183,7 @@ private:
static BOOL sDisplayText ;
static std::set<LLPointer<LLHUDNameTag> > sTextObjects;
static std::vector<LLPointer<LLHUDNameTag> > sVisibleTextObjects;
- static std::vector<LLPointer<LLHUDNameTag> > sVisibleHUDTextObjects;
+// static std::vector<LLPointer<LLHUDNameTag> > sVisibleHUDTextObjects;
typedef std::set<LLPointer<LLHUDNameTag> >::iterator TextObjectIterator;
typedef std::vector<LLPointer<LLHUDNameTag> >::iterator VisibleTextObjectIterator;
};
diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp
index c362128cb8..91d5fcf665 100644
--- a/indra/newview/llhudtext.cpp
+++ b/indra/newview/llhudtext.cpp
@@ -86,7 +86,7 @@ bool lltextobject_further_away::operator()(const LLPointer<LLHUDText>& lhs, cons
LLHUDText::LLHUDText(const U8 type) :
LLHUDObject(type),
mOnHUDAttachment(FALSE),
- mVisibleOffScreen(FALSE),
+// mVisibleOffScreen(FALSE),
mWidth(0.f),
mHeight(0.f),
mFontp(LLFontGL::getFontSansSerifSmall()),
@@ -442,15 +442,15 @@ void LLHUDText::updateVisibility()
mOffscreen = FALSE;
if (!LLViewerCamera::getInstance()->sphereInFrustum(render_position, mRadius))
{
- if (!mVisibleOffScreen)
- {
+// if (!mVisibleOffScreen)
+// {
mVisible = FALSE;
return;
- }
- else
- {
- mOffscreen = TRUE;
- }
+// }
+// else
+// {
+// mOffscreen = TRUE;
+// }
}
mVisible = TRUE;
@@ -465,11 +465,11 @@ LLVector2 LLHUDText::updateScreenPos(LLVector2 &offset)
LLVector3 y_pixel_vec;
LLViewerCamera::getInstance()->getPixelVectors(mPositionAgent, y_pixel_vec, x_pixel_vec);
LLVector3 world_pos = mPositionAgent + (offset.mV[VX] * x_pixel_vec) + (offset.mV[VY] * y_pixel_vec);
- if (!LLViewerCamera::getInstance()->projectPosAgentToScreen(world_pos, screen_pos, FALSE) && mVisibleOffScreen)
- {
- // bubble off-screen, so find a spot for it along screen edge
- LLViewerCamera::getInstance()->projectPosAgentToScreenEdge(world_pos, screen_pos);
- }
+// if (!LLViewerCamera::getInstance()->projectPosAgentToScreen(world_pos, screen_pos, FALSE) && mVisibleOffScreen)
+// {
+// // bubble off-screen, so find a spot for it along screen edge
+// LLViewerCamera::getInstance()->projectPosAgentToScreenEdge(world_pos, screen_pos);
+// }
screen_pos_vec.setVec((F32)screen_pos.mX, (F32)screen_pos.mY);
diff --git a/indra/newview/llhudtext.h b/indra/newview/llhudtext.h
index 023c7d8ff3..27b8f07cca 100644
--- a/indra/newview/llhudtext.h
+++ b/indra/newview/llhudtext.h
@@ -105,7 +105,7 @@ public:
void setAlpha(F32 alpha);
void setZCompare(const BOOL zcompare);
void setDoFade(const BOOL do_fade);
- void setVisibleOffScreen(BOOL visible) { mVisibleOffScreen = visible; }
+// void setVisibleOffScreen(BOOL visible) { mVisibleOffScreen = visible; }
// mMaxLines of -1 means unlimited lines.
void setMaxLines(S32 max_lines) { mMaxLines = max_lines; }
@@ -147,7 +147,7 @@ private:
F32 mFadeDistance;
F32 mLastDistance;
BOOL mZCompare;
- BOOL mVisibleOffScreen;
+// BOOL mVisibleOffScreen;
BOOL mOffscreen;
LLColor4 mColor;
LLVector3 mScale;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 5e1e2bb511..582fc811a0 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2753,7 +2753,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
{
mNameText = static_cast<LLHUDNameTag*>( LLHUDObject::addHUDObject(
LLHUDObject::LL_HUD_NAME_TAG) );
- mNameText->setMass(10.f);
+ //mNameText->setMass(10.f);
mNameText->setSourceObject(this);
mNameText->setVertAlignment(LLHUDNameTag::ALIGN_VERT_TOP);
mNameText->setVisibleOffScreen(TRUE);