From 0a3a4a51bd24bb00f64144570ae1268c96436805 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Sun, 25 May 2014 12:44:48 -0400 Subject: [PATCH] Feature Request: Add an option to "Make rightclick zoom instantaneous, not smooth" (in Input & Camera preferences) --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/lltoolcomp.cpp | 3 +++ .../default/xui/en-us/panel_preferences_input.xml | 1 + 3 files changed, 15 insertions(+) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index accc2a070..247ebaee8 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -867,6 +867,17 @@ Value 1 + LiruMouselookInstantZoom + + Comment + Whether or not the right click zoom in mouselook will be instant or smoothly transition between zooms + Persist + 1 + Type + Boolean + Value + 0 + LiruMouselookMenu Comment diff --git a/indra/newview/lltoolcomp.cpp b/indra/newview/lltoolcomp.cpp index 2c442069e..44c8c4a0e 100644 --- a/indra/newview/lltoolcomp.cpp +++ b/indra/newview/lltoolcomp.cpp @@ -783,6 +783,7 @@ BOOL LLToolCompGun::handleRightMouseUp(S32 x, S32 y, MASK mask) mStartFOV = LLViewerCamera::getInstance()->getDefaultFOV(); mTargetFOV = mOriginalFOV; + gSavedSettings.getBOOL("LiruMouselookInstantZoom") ? LLViewerCamera::getInstance()->setDefaultFOV(mTargetFOV) : mTimerFOV.start(); } @@ -814,6 +815,7 @@ BOOL LLToolCompGun::handleRightMouseDown(S32 x, S32 y, MASK mask) else mStartFOV = LLViewerCamera::getInstance()->getDefaultFOV(); mTargetFOV = gSavedSettings.getF32("ExodusAlternativeFOV"); + gSavedSettings.getBOOL("LiruMouselookInstantZoom") ? LLViewerCamera::getInstance()->setDefaultFOV(mTargetFOV) : mTimerFOV.start(); return TRUE; @@ -832,6 +834,7 @@ BOOL LLToolCompGun::handleScrollWheel(S32 x, S32 y, S32 clicks) llclamp(mTargetFOV -= (0.05f * -clicks), 0.1f, 3.0f) ); + gSavedSettings.getBOOL("LiruMouselookInstantZoom") ? LLViewerCamera::getInstance()->setDefaultFOV(mTargetFOV) : mTimerFOV.start(); } else if (clicks > 0) gAgentCamera.changeCameraToDefault(); diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml index b5252a17a..464f60645 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml @@ -4,6 +4,7 @@ Mouse Sensitivity: + UI Hidden in mouselook: