Commits

Anonymous committed 4776263

SOCIAL-741 FIX Gesture graphic for click to move in-world

  • Participants
  • Parent commits 33dab23

Comments (0)

Files changed (5)

File indra/newview/llhudeffectblob.cpp

 
 #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()
 	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()

File indra/newview/llhudeffectblob.h

 #define LL_LLHUDEFFECTBLOB_H
 
 #include "llhudeffect.h"
+#include "lluiimage.h"
 
 class LLHUDEffectBlob : public LLHUDEffect
 {
 private:
 	S32				mPixelSize;
 	LLFrameTimer	mTimer;
+	LLPointer<LLUIImage> mImage;
 };
 
 #endif // LL_LLHUDEFFECTBLOB_H

File indra/newview/lltoolpie.cpp

 		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();
 		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);
 	}

File indra/newview/skins/default/textures/textures.xml

 
   <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>

File indra/newview/skins/default/textures/world/CameraDragDot.png

Added
New image