diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index f4054e0923..ca933ad979 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -16408,5 +16408,20 @@ Change of this parameter will affect the layout of buttons in notification toast
Value
1
+ _NACL_MLFovValues
+
diff --git a/indra/newview/lltoolcomp.cpp b/indra/newview/lltoolcomp.cpp
index 923fbecb1a..165e07b52e 100644
--- a/indra/newview/lltoolcomp.cpp
+++ b/indra/newview/lltoolcomp.cpp
@@ -741,9 +741,30 @@ BOOL LLToolCompGun::handleRightMouseDown(S32 x, S32 y, MASK mask)
*/
// Returning true will suppress the context menu
+ // NaCl - Rightclick-mousewheel zoom
+ static LLCachedControl _NACL_MLFovValues(gSavedSettings,"_NACL_MLFovValues");
+ static LLCachedControl CameraAngle(gSavedSettings,"CameraAngle");
+ LLVector3 vTemp=_NACL_MLFovValues;
+ vTemp.mV[0]=CameraAngle;
+ vTemp.mV[2]=1.0f;
+ gSavedSettings.setVector3("_NACL_MLFovValues",vTemp);
+ gSavedSettings.setF32("CameraAngle",vTemp.mV[1]);
+ // NaCl End
return TRUE;
}
-
+// NaCl - Rightclick-mousewheel zoom
+BOOL LLToolCompGun::handleRightMouseUp(S32 x, S32 y, MASK mask)
+{
+ static LLCachedControl _NACL_MLFovValues(gSavedSettings,"_NACL_MLFovValues");
+ static LLCachedControl CameraAngle(gSavedSettings,"CameraAngle");
+ LLVector3 vTemp=_NACL_MLFovValues;
+ vTemp.mV[1]=CameraAngle;
+ vTemp.mV[2]=0.0f;
+ gSavedSettings.setVector3("_NACL_MLFovValues",vTemp);
+ gSavedSettings.setF32("CameraAngle",vTemp.mV[0]);
+ return TRUE;
+}
+// NaCl End
BOOL LLToolCompGun::handleMouseUp(S32 x, S32 y, MASK mask)
{
@@ -777,7 +798,19 @@ void LLToolCompGun::handleDeselect()
BOOL LLToolCompGun::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
- if (clicks > 0)
+ // NaCl - Rightclick-mousewheel zoom
+ static LLCachedControl _NACL_MLFovValues(gSavedSettings,"_NACL_MLFovValues");
+ static LLCachedControl CameraAngle(gSavedSettings,"CameraAngle");
+ LLVector3 vTemp=_NACL_MLFovValues;
+ vTemp.mV[1]=CameraAngle;
+ if(vTemp.mV[2] > 0.0f)
+ {
+ vTemp.mV[1]+=clicks*0.1;
+ gSavedSettings.setVector3("_NACL_MLFovValues",vTemp);
+ gSavedSettings.setF32("CameraAngle",vTemp.mV[1]);
+ }
+ else if (clicks > 0)
+ // NaCl End
{
gAgentCamera.changeCameraToDefault();
diff --git a/indra/newview/lltoolcomp.h b/indra/newview/lltoolcomp.h
index bbb5ed5797..3721d9086c 100644
--- a/indra/newview/lltoolcomp.h
+++ b/indra/newview/lltoolcomp.h
@@ -53,6 +53,9 @@ public:
virtual BOOL handleHover(S32 x, S32 y, MASK mask) { return mCur->handleHover( x, y, mask ); }
virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks) { return mCur->handleScrollWheel( x, y, clicks ); }
virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask) { return mCur->handleRightMouseDown( x, y, mask ); }
+ // NaCl - Rightclick-mousewheel zoom
+ virtual BOOL handleRightMouseUp(S32 x, S32 y, MASK mask) { return mCur->handleRightMouseUp( x, y, mask ); }
+ // NaCl End
virtual LLViewerObject* getEditingObject() { return mCur->getEditingObject(); }
virtual LLVector3d getEditingPointGlobal() { return mCur->getEditingPointGlobal(); }
@@ -218,6 +221,9 @@ public:
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
+ // NaCl - Rightclick-mousewheel zoom
+ virtual BOOL handleRightMouseUp(S32 x, S32 y, MASK mask);
+ // NaCl End
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
virtual void onMouseCaptureLost();