summaryrefslogtreecommitdiff
path: root/indra/newview/llquickprefs.cpp
diff options
context:
space:
mode:
authorHadet <hadet@Mac.lan>2026-05-28 21:27:52 -0500
committerHadet <hadet@Mac.lan>2026-05-29 18:03:54 -0500
commit4c6584d1ecc57e8a34e078935b03851b59d4f9eb (patch)
tree5c8a3edc3a5ae79c93a0d35becdc510606cfdec1 /indra/newview/llquickprefs.cpp
parent184cd85f01b7654e8dd3e476b2c268849d97ee78 (diff)
add Over-The-Shoulder mouse look alternative
Diffstat (limited to 'indra/newview/llquickprefs.cpp')
-rw-r--r--indra/newview/llquickprefs.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/indra/newview/llquickprefs.cpp b/indra/newview/llquickprefs.cpp
index 800aa7abac..9e83857a15 100644
--- a/indra/newview/llquickprefs.cpp
+++ b/indra/newview/llquickprefs.cpp
@@ -26,6 +26,8 @@
#include "llquickprefs.h"
#include "llagent.h"
+#include "llagentcamera.h"
+#include "llcheckboxctrl.h"
#include "llsliderctrl.h"
#include "lltextbox.h"
#include "llviewercontrol.h"
@@ -97,6 +99,14 @@ bool LLFloaterQuickPrefs::postBuild()
}
onRegionChanged(); // evaluate current region immediately
+ // OTS aim mode checkbox
+ mOTSEnabledCheck = getChild<LLCheckBoxCtrl>("ots_enabled");
+ if (mOTSEnabledCheck)
+ {
+ mOTSEnabledCheck->setCommitCallback(
+ boost::bind(&LLFloaterQuickPrefs::onOTSEnabledChanged, this));
+ }
+
return true;
}
@@ -203,3 +213,16 @@ void LLFloaterQuickPrefs::syncAvatarZOffsetFromPreferenceSetting()
F32 value = gSavedPerAccountSettings.getF32("AvatarHoverOffsetZ");
mAvatarZOffsetSlider->setValue(value, false); // false = no commit signal
}
+
+void LLFloaterQuickPrefs::onOTSEnabledChanged()
+{
+ if (mOTSEnabledCheck)
+ {
+ gSavedSettings.setBOOL("OTSEnabled", mOTSEnabledCheck->get());
+ // If currently in OTS mode and checkbox was unchecked, exit OTS
+ if (!mOTSEnabledCheck->get() && gAgentCamera.cameraOTS())
+ {
+ gAgentCamera.changeCameraFromOTS();
+ }
+ }
+}