Right Click Mouse Scroll Zoom and Xcode fix
This commit is contained in:
@@ -82,8 +82,9 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
|||||||
set(CMAKE_XCODE_ATTIBUTE_GCC_VERSION "4.2")
|
set(CMAKE_XCODE_ATTIBUTE_GCC_VERSION "4.2")
|
||||||
else (${XCODE_VERSION} VERSION_LESS 4.0.0)
|
else (${XCODE_VERSION} VERSION_LESS 4.0.0)
|
||||||
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.6.sdk)
|
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.6.sdk)
|
||||||
set(CMAKE_XCODE_ATTIBUTE_GCC_VERSION "4.2")
|
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
|
||||||
endif (${XCODE_VERSION} VERSION_LESS 4.0.0)
|
endif (${XCODE_VERSION} VERSION_LESS 4.0.0)
|
||||||
|
|
||||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5)
|
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5)
|
||||||
|
|
||||||
# NOTE: To attempt an i386/PPC Universal build, add this on the configure line:
|
# NOTE: To attempt an i386/PPC Universal build, add this on the configure line:
|
||||||
|
|||||||
@@ -67,6 +67,51 @@
|
|||||||
<integer>100</integer>
|
<integer>100</integer>
|
||||||
</map>
|
</map>
|
||||||
|
|
||||||
|
<key>zmm_deffov</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>Default field of viewer for right click mouse zoom.</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>F32</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<real>1.0</real>
|
||||||
|
</map>
|
||||||
|
<key>zmm_mlfov</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>1=Normal, Under 1 Zoom Out, Over 1 Zoom in </string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>F32</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<real>1</real>
|
||||||
|
</map>
|
||||||
|
<key>zmm_isinml</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>mouselook</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>Boolean</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</map>
|
||||||
|
<key>zmm_rightmousedown</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>insert rude comment here</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>Boolean</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</map>
|
||||||
|
|
||||||
<key>AllowLargeSounds</key>
|
<key>AllowLargeSounds</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
|
|||||||
@@ -57,6 +57,7 @@
|
|||||||
#include "llfloatertools.h"
|
#include "llfloatertools.h"
|
||||||
#include "qtoolalign.h"
|
#include "qtoolalign.h"
|
||||||
#include "llviewercontrol.h"
|
#include "llviewercontrol.h"
|
||||||
|
#include "llviewercamera.h"
|
||||||
|
|
||||||
const S32 BUTTON_HEIGHT = 16;
|
const S32 BUTTON_HEIGHT = 16;
|
||||||
const S32 BUTTON_WIDTH_SMALL = 32;
|
const S32 BUTTON_WIDTH_SMALL = 32;
|
||||||
@@ -799,6 +800,20 @@ void LLToolCompGun::handleDeselect()
|
|||||||
|
|
||||||
BOOL LLToolCompGun::handleScrollWheel(S32 x, S32 y, S32 clicks)
|
BOOL LLToolCompGun::handleScrollWheel(S32 x, S32 y, S32 clicks)
|
||||||
{
|
{
|
||||||
|
//::MOYMOD::
|
||||||
|
if(gSavedSettings.getBOOL("zmm_isinml") == 1)
|
||||||
|
{
|
||||||
|
if(clicks > 0)
|
||||||
|
{
|
||||||
|
gSavedSettings.setF32("zmm_mlfov", gSavedSettings.getF32("zmm_mlfov") / 1.1);
|
||||||
|
}
|
||||||
|
else if(clicks < 0)
|
||||||
|
{
|
||||||
|
gSavedSettings.setF32("zmm_mlfov", gSavedSettings.getF32("zmm_mlfov") * 1.1);
|
||||||
|
}
|
||||||
|
LLViewerCamera::getInstance()->setDefaultFOV(gSavedSettings.getF32("zmm_deffov") / gSavedSettings.getF32("zmm_mlfov"));
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
if (clicks > 0)
|
if (clicks > 0)
|
||||||
{
|
{
|
||||||
gAgentCamera.changeCameraToDefault();
|
gAgentCamera.changeCameraToDefault();
|
||||||
|
|||||||
@@ -962,6 +962,17 @@ BOOL LLViewerWindow::handleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask)
|
|||||||
|
|
||||||
BOOL LLViewerWindow::handleRightMouseDown(LLWindow *window, LLCoordGL pos, MASK mask)
|
BOOL LLViewerWindow::handleRightMouseDown(LLWindow *window, LLCoordGL pos, MASK mask)
|
||||||
{
|
{
|
||||||
|
//From Phoenix
|
||||||
|
gSavedSettings.setBOOL("zmm_rightmousedown",1);
|
||||||
|
if(gAgentCamera.cameraMouselook()&&gSavedSettings.getBOOL("zmm_isinml")==0)
|
||||||
|
{
|
||||||
|
llinfos << "zmmisinml set to true" << llendl;
|
||||||
|
gSavedSettings.setBOOL("zmm_isinml",1);
|
||||||
|
F32 deffov=LLViewerCamera::getInstance()->getDefaultFOV();
|
||||||
|
gSavedSettings.setF32("zmm_deffov",deffov);
|
||||||
|
LLViewerCamera::getInstance()->setDefaultFOV(gSavedSettings.getF32("zmm_deffov")/gSavedSettings.getF32("zmm_mlfov"));
|
||||||
|
}
|
||||||
|
|
||||||
S32 x = pos.mX;
|
S32 x = pos.mX;
|
||||||
S32 y = pos.mY;
|
S32 y = pos.mY;
|
||||||
x = llround((F32)x / mDisplayScale.mV[VX]);
|
x = llround((F32)x / mDisplayScale.mV[VX]);
|
||||||
@@ -991,6 +1002,14 @@ BOOL LLViewerWindow::handleRightMouseDown(LLWindow *window, LLCoordGL pos, MASK
|
|||||||
|
|
||||||
BOOL LLViewerWindow::handleRightMouseUp(LLWindow *window, LLCoordGL pos, MASK mask)
|
BOOL LLViewerWindow::handleRightMouseUp(LLWindow *window, LLCoordGL pos, MASK mask)
|
||||||
{
|
{
|
||||||
|
gSavedSettings.setBOOL("zmm_rightmousedown",0);
|
||||||
|
if(gSavedSettings.getBOOL("zmm_isinml")==1)
|
||||||
|
{
|
||||||
|
llinfos << "zmmisinml set to false" << llendl;
|
||||||
|
gSavedSettings.setBOOL("zmm_isinml",0);
|
||||||
|
LLViewerCamera::getInstance()->setDefaultFOV(gSavedSettings.getF32("zmm_deffov"));
|
||||||
|
}
|
||||||
|
|
||||||
BOOL down = FALSE;
|
BOOL down = FALSE;
|
||||||
return handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_RIGHT,down);
|
return handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_RIGHT,down);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user