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

master
Richard Linden 2011-03-17 18:09:36 -07:00
parent 784c2079e9
commit 1db1c3443e
5 changed files with 26 additions and 11 deletions

View File

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

View File

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

View File

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

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB