summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRichard Linden <none@none>2010-09-28 17:13:08 -0700
committerRichard Linden <none@none>2010-09-28 17:13:08 -0700
commit6c1f89ea6e0d63c59da4e3a33c9252371032b58b (patch)
tree59483461b19b4db9baf7837f46ece1922929955c /indra
parent67be46c78a28864360a0ca5ba66d6044a1b9b38d (diff)
added settings to toggle grab and alt-zoom ability
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/app_settings/settings.xml22
-rw-r--r--indra/newview/lltool.cpp8
-rw-r--r--indra/newview/lltoolpie.cpp16
3 files changed, 37 insertions, 9 deletions
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 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>EnableGrab</key>
+ <map>
+ <key>Comment</key>
+ <string>Use Ctrl+mouse to grab and manipulate objects</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
+ <key>EnableAltZoom</key>
+ <map>
+ <key>Comment</key>
+ <string>Use Alt+mouse to look at and zoom in on objects</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>EnableRippleWater</key>
<map>
<key>Comment</key>
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);
}