From 6c1f89ea6e0d63c59da4e3a33c9252371032b58b Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 28 Sep 2010 17:13:08 -0700 Subject: added settings to toggle grab and alt-zoom ability --- indra/newview/app_settings/settings.xml | 22 ++++++++++++++++++++++ indra/newview/lltool.cpp | 8 ++++++-- indra/newview/lltoolpie.cpp | 16 +++++++++------- 3 files changed, 37 insertions(+), 9 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index a83291b530..13fed89867 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2820,6 +2820,28 @@ Value 1 + EnableGrab + + Comment + Use Ctrl+mouse to grab and manipulate objects + Persist + 1 + Type + Boolean + Value + 1 + + EnableAltZoom + + Comment + Use Alt+mouse to look at and zoom in on objects + Persist + 1 + Type + Boolean + Value + 1 + EnableRippleWater Comment diff --git a/indra/newview/lltool.cpp b/indra/newview/lltool.cpp index 282d4e19c6..2d8ce95347 100644 --- a/indra/newview/lltool.cpp +++ b/indra/newview/lltool.cpp @@ -33,6 +33,7 @@ #include "llview.h" #include "llviewerwindow.h" +#include "llviewercontrol.h" #include "lltoolcomp.h" #include "lltoolfocus.h" #include "llfocusmgr.h" @@ -190,9 +191,12 @@ LLTool* LLTool::getOverrideTool(MASK mask) { return NULL; } - if (mask & MASK_ALT) + if (gSavedSettings.getBOOL("EnableAltZoom")) { - return LLToolCamera::getInstance(); + if (mask & MASK_ALT) + { + return LLToolCamera::getInstance(); + } } return NULL; } diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 864de018e0..2ee3e4ffed 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -1210,15 +1210,17 @@ void LLToolPie::handleDeselect() LLTool* LLToolPie::getOverrideTool(MASK mask) { - if (mask == MASK_CONTROL) + if (gSavedSettings.getBOOL("EnableGrab")) { - return LLToolGrab::getInstance(); - } - else if (mask == (MASK_CONTROL | MASK_SHIFT)) - { - return LLToolGrab::getInstance(); + if (mask == MASK_CONTROL) + { + return LLToolGrab::getInstance(); + } + else if (mask == (MASK_CONTROL | MASK_SHIFT)) + { + return LLToolGrab::getInstance(); + } } - return LLTool::getOverrideTool(mask); } -- cgit v1.2.3