diff options
author | maxim_productengine <mnikolenko@productengine.com> | 2019-12-18 11:26:22 +0200 |
---|---|---|
committer | maxim_productengine <mnikolenko@productengine.com> | 2019-12-18 11:26:22 +0200 |
commit | abd5277a7b3dac90e8a555eefe855cfcca1536dc (patch) | |
tree | 808173f8af4e82fc0dd9e3d32b2e956e32d9cf50 /indra | |
parent | b0265f97563efc5b6e95b9f14352878185c1be05 (diff) |
SL-12424 WIP Save mousewheel zoom fraction in preset
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/app_settings/camera/Front.xml | 11 | ||||
-rw-r--r-- | indra/newview/app_settings/camera/Rear.xml | 11 | ||||
-rw-r--r-- | indra/newview/app_settings/camera/Side.xml | 11 | ||||
-rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | indra/newview/llfloatercamera.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llpresetsmanager.cpp | 4 |
6 files changed, 48 insertions, 1 deletions
diff --git a/indra/newview/app_settings/camera/Front.xml b/indra/newview/app_settings/camera/Front.xml index cb3380589e..e4839d48ec 100644 --- a/indra/newview/app_settings/camera/Front.xml +++ b/indra/newview/app_settings/camera/Front.xml @@ -63,6 +63,17 @@ <key>Value</key> <real>1</real> </map> + <key>CameraZoomFraction</key> + <map> + <key>Comment</key> + <string>Mousewheel driven fraction of zoom</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>0.9</real> + </map> <key>EditCameraMovement</key> <map> <key>Comment</key> diff --git a/indra/newview/app_settings/camera/Rear.xml b/indra/newview/app_settings/camera/Rear.xml index 0bfe5a9ed8..72e6c5d93a 100644 --- a/indra/newview/app_settings/camera/Rear.xml +++ b/indra/newview/app_settings/camera/Rear.xml @@ -63,6 +63,17 @@ <key>Value</key> <real>1</real> </map> + <key>CameraZoomFraction</key> + <map> + <key>Comment</key> + <string>Mousewheel driven fraction of zoom</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>0.9</real> + </map> <key>EditCameraMovement</key> <map> <key>Comment</key> diff --git a/indra/newview/app_settings/camera/Side.xml b/indra/newview/app_settings/camera/Side.xml index 49582a8a3c..eb3b3253c1 100644 --- a/indra/newview/app_settings/camera/Side.xml +++ b/indra/newview/app_settings/camera/Side.xml @@ -63,6 +63,17 @@ <key>Value</key> <real>1</real> </map> + <key>CameraZoomFraction</key> + <map> + <key>Comment</key> + <string>Mousewheel driven fraction of zoom</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>0.9</real> + </map> <key>EditCameraMovement</key> <map> <key>Comment</key> diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 5be89c92a8..93a3c29530 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1525,6 +1525,17 @@ <key>Value</key> <real>1.0</real> </map> + <key>CameraZoomFraction</key> + <map> + <key>Comment</key> + <string>Mousewheel driven fraction of zoom</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>0.9</real> + </map> <key>CameraPosOnLogout</key> <map> <key>Comment</key> diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index 7e538d1bfc..f45033aa20 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -565,6 +565,7 @@ void LLFloaterCamera::switchToPreset(const std::string& name) { LLPresetsManager::getInstance()->loadPreset(PRESETS_CAMERA, name); } + gAgentCamera.setCameraZoomFraction(gSavedSettings.getF32("CameraZoomFraction")); LLFloaterCamera* camera_floater = LLFloaterCamera::findInstance(); if (camera_floater) diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp index c4161ed1bc..73978e9dfb 100644 --- a/indra/newview/llpresetsmanager.cpp +++ b/indra/newview/llpresetsmanager.cpp @@ -236,7 +236,6 @@ void LLPresetsManager::getControlNames(std::vector<std::string>& names) ("AppearanceCameraMovement") // From llagentcamera.cpp ("CameraOffsetBuild") - ("CameraOffsetScale") ("TrackFocusObject") ("CameraOffsetRearView") ("FocusOffsetRearView") @@ -288,6 +287,9 @@ bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string n name_list.clear(); getControlNames(name_list); name_list.push_back("PresetCameraActive"); + + gSavedSettings.setF32("CameraZoomFraction", gAgentCamera.getCameraZoomFraction()); + name_list.push_back("CameraZoomFraction"); } else { |