summaryrefslogtreecommitdiff
path: root/indra/newview/llhudeffectblob.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2011-03-14 16:46:10 -0700
committerRichard Linden <none@none>2011-03-14 16:46:10 -0700
commit0e10a83b6bc11d0a40f09e6ba59b30c0e1e343bd (patch)
treeb0443fb75edb088f06495067ce737412f916f877 /indra/newview/llhudeffectblob.cpp
parent2de88a99d9de776ea9bc3cef293d0e3bf40f9b7e (diff)
SOCIAL-695 FIX Selecting UI and then clicking on world to give focus back to viewer moves you to that location
made this work when clicking on SL with another app in foreground visual feedback of ClickToWalk behavior
Diffstat (limited to 'indra/newview/llhudeffectblob.cpp')
-rw-r--r--indra/newview/llhudeffectblob.cpp34
1 files changed, 33 insertions, 1 deletions
diff --git a/indra/newview/llhudeffectblob.cpp b/indra/newview/llhudeffectblob.cpp
index 6ef8fab4a6..f976a320ee 100644
--- a/indra/newview/llhudeffectblob.cpp
+++ b/indra/newview/llhudeffectblob.cpp
@@ -28,8 +28,15 @@
#include "llhudeffectblob.h"
-LLHUDEffectBlob::LLHUDEffectBlob(const U8 type) : LLHUDEffect(type)
+#include "llagent.h"
+#include "llviewercamera.h"
+#include "llrendersphere.h"
+
+LLHUDEffectBlob::LLHUDEffectBlob(const U8 type)
+: LLHUDEffect(type),
+ mPixelSize(10)
{
+ mTimer.start();
}
LLHUDEffectBlob::~LLHUDEffectBlob()
@@ -38,6 +45,31 @@ LLHUDEffectBlob::~LLHUDEffectBlob()
void LLHUDEffectBlob::render()
{
+ F32 time = mTimer.getElapsedTimeF32();
+ if (mDuration < time)
+ {
+ markDead();
+ }
+
+ LLVector3 pos_agent = gAgent.getPosAgentFromGlobal(mPositionGlobal);
+
+ LLVector3 pixel_up, pixel_right;
+
+ LLViewerCamera::instance().getPixelVectors(pos_agent, pixel_up, pixel_right);
+
+ LLGLSPipelineAlpha gls_pipeline_alpha;
+ gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+
+ LLColor4U color = mColor;
+ color.mV[VALPHA] = clamp_rescale(time, 0.f, mDuration, 255.f, 0.f);
+ glColor4ubv(color.mV);
+
+ glPushMatrix();
+ glTranslatef(pos_agent.mV[0], pos_agent.mV[1], pos_agent.mV[2]);
+ F32 scale = pixel_up.magVec() * (F32)mPixelSize;
+ glScalef(scale, scale, scale);
+ gSphere.render(0);
+ glPopMatrix();
}
void LLHUDEffectBlob::renderForTimer()