summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRichard Linden <none@none>2011-03-17 18:09:36 -0700
committerRichard Linden <none@none>2011-03-17 18:09:36 -0700
commit1db1c3443ea4e9cde52bfb3c0e127426f02a742f (patch)
treed0f8faa91beab50e6941573a05278bda6eb2f9d1 /indra
parent784c2079e98d752355bb81ee98a8c3a0399aaa74 (diff)
SOCIAL-741 FIX Gesture graphic for click to move in-world
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llhudeffectblob.cpp30
-rw-r--r--indra/newview/llhudeffectblob.h2
-rw-r--r--indra/newview/lltoolpie.cpp4
-rw-r--r--indra/newview/skins/default/textures/textures.xml1
-rw-r--r--indra/newview/skins/default/textures/world/CameraDragDot.pngbin0 -> 3101 bytes
5 files changed, 26 insertions, 11 deletions
diff --git a/indra/newview/llhudeffectblob.cpp b/indra/newview/llhudeffectblob.cpp
index 26e8251899..d8687eed8d 100644
--- a/indra/newview/llhudeffectblob.cpp
+++ b/indra/newview/llhudeffectblob.cpp
@@ -30,13 +30,14 @@
#include "llagent.h"
#include "llviewercamera.h"
-#include "llrendersphere.h"
+#include "llui.h"
LLHUDEffectBlob::LLHUDEffectBlob(const U8 type)
: LLHUDEffect(type),
mPixelSize(10)
{
mTimer.start();
+ mImage = LLUI::getUIImage("Camera_Drag_Dot");
}
LLHUDEffectBlob::~LLHUDEffectBlob()
@@ -58,18 +59,29 @@ void LLHUDEffectBlob::render()
LLViewerCamera::instance().getPixelVectors(pos_agent, pixel_up, pixel_right);
LLGLSPipelineAlpha gls_pipeline_alpha;
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+ gGL.getTexUnit(0)->bind(mImage->getImage());
LLColor4U color = mColor;
color.mV[VALPHA] = (U8)clamp_rescale(time, 0.f, mDuration, 255.f, 0.f);
- glColor4ubv(color.mV);
+ gGL.color4ubv(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();
+ { gGL.pushMatrix();
+ gGL.translatef(pos_agent.mV[0], pos_agent.mV[1], pos_agent.mV[2]);
+ LLVector3 u_scale = pixel_right * (F32)mPixelSize;
+ LLVector3 v_scale = pixel_up * (F32)mPixelSize;
+
+ { gGL.begin(LLRender::QUADS);
+ gGL.texCoord2f(0.f, 1.f);
+ gGL.vertex3fv((v_scale - u_scale).mV);
+ gGL.texCoord2f(0.f, 0.f);
+ gGL.vertex3fv((-v_scale - u_scale).mV);
+ gGL.texCoord2f(1.f, 0.f);
+ gGL.vertex3fv((-v_scale + u_scale).mV);
+ gGL.texCoord2f(1.f, 1.f);
+ gGL.vertex3fv((v_scale + u_scale).mV);
+ } gGL.end();
+
+ } gGL.popMatrix();
}
void LLHUDEffectBlob::renderForTimer()
diff --git a/indra/newview/llhudeffectblob.h b/indra/newview/llhudeffectblob.h
index 5b0703cdaa..f4c1691108 100644
--- a/indra/newview/llhudeffectblob.h
+++ b/indra/newview/llhudeffectblob.h
@@ -28,6 +28,7 @@
#define LL_LLHUDEFFECTBLOB_H
#include "llhudeffect.h"
+#include "lluiimage.h"
class LLHUDEffectBlob : public LLHUDEffect
{
@@ -45,6 +46,7 @@ protected:
private:
S32 mPixelSize;
LLFrameTimer mTimer;
+ LLPointer<LLUIImage> mImage;
};
#endif // LL_LLHUDEFFECTBLOB_H
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 78df193dc3..9549f180df 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -658,7 +658,7 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask)
mAutoPilotDestination = (LLHUDEffectBlob *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BLOB, FALSE);
mAutoPilotDestination->setPositionGlobal(mPick.mPosGlobal);
mAutoPilotDestination->setPixelSize(5);
- mAutoPilotDestination->setColor(LLColor4U(50, 50, 200));
+ mAutoPilotDestination->setColor(LLColor4U(170, 210, 190));
mAutoPilotDestination->setDuration(3.f);
handle_go_to();
@@ -1778,7 +1778,7 @@ void LLToolPie::startCameraSteering()
if (mMouseSteerGrabPoint) { mMouseSteerGrabPoint->markDead(); }
mMouseSteerGrabPoint = (LLHUDEffectBlob *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BLOB, FALSE);
mMouseSteerGrabPoint->setPositionGlobal(mSteerPick.mPosGlobal);
- mMouseSteerGrabPoint->setColor(LLColor4U(50, 50, 200));
+ mMouseSteerGrabPoint->setColor(LLColor4U(170, 210, 190));
mMouseSteerGrabPoint->setPixelSize(5);
mMouseSteerGrabPoint->setDuration(2.f);
}
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index cec2942b35..d79d660724 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -673,4 +673,5 @@ with the same filename but different name
<texture name="Yellow_Gradient" file_name="windows/yellow_gradient.png"/>
<texture name="Popup_Caution" file_name="icons/pop_up_caution.png"/>
+ <texture name="Camera_Drag_Dot" file_name="world/CameraDragDot.png"/>
</textures>
diff --git a/indra/newview/skins/default/textures/world/CameraDragDot.png b/indra/newview/skins/default/textures/world/CameraDragDot.png
new file mode 100644
index 0000000000..57698e1956
--- /dev/null
+++ b/indra/newview/skins/default/textures/world/CameraDragDot.png
Binary files differ