From d414063e6c590728348fb1127da4c90a9896d691 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Thu, 4 Feb 2010 19:55:07 -0600 Subject: Added SliderScrollWheelMultiplier setting. Affects the direction sliders move from mouse scroll wheel. Also added LLSlider::getScrollWheelMultiplier() and LLSlider::setScrollWheelMultiplier(). --- linden/indra/newview/app_settings/settings.xml | 11 +++++++++++ linden/indra/newview/llappviewer.cpp | 3 +++ linden/indra/newview/llviewercontrol.cpp | 9 +++++++++ 3 files changed, 23 insertions(+) (limited to 'linden/indra/newview') diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 76183ef..f8594ad 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -9458,6 +9458,17 @@ 29 + SliderScrollWheelMultiplier + + Comment + Multiplier for the amount the mouse scroll wheel affects slider widgets in the UI. E.g. -1 makes sliders move the opposite way when scrolled. + Persist + 1 + Type + S32 + Value + 1 + SmallAvatarNames Comment diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index f1c6064..a57050d 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp @@ -146,6 +146,7 @@ #include "llvovolume.h" #include "llflexibleobject.h" #include "llvosurfacepatch.h" +#include "llslider.h" // includes for idle() idleShutdown() #include "llviewercontrol.h" @@ -422,6 +423,8 @@ static void settings_to_globals() LLHoverView::sShowHoverTips = gSavedSettings.getBOOL("ShowHoverTips"); LLCubeMap::sUseCubeMaps = LLFeatureManager::getInstance()->isFeatureAvailable("RenderCubeMap"); + + LLSlider::setScrollWheelMultiplier( gSavedSettings.getS32("SliderScrollWheelMultiplier") ); } static void settings_modify() diff --git a/linden/indra/newview/llviewercontrol.cpp b/linden/indra/newview/llviewercontrol.cpp index b9db346..08e9d45 100644 --- a/linden/indra/newview/llviewercontrol.cpp +++ b/linden/indra/newview/llviewercontrol.cpp @@ -71,6 +71,8 @@ #include "llvowlsky.h" #include "llrender.h" #include "llmediamanager.h" +#include "llslider.h" + #ifdef TOGGLE_HACKED_GODLIKE_VIEWER BOOL gHackGodmode = FALSE; @@ -462,6 +464,12 @@ bool handleMediaDebugLevelChanged(const LLSD& newvalue) return true; } +bool handleSliderScrollWheelMultiplierChanged(const LLSD& newvalue) +{ + LLSlider::setScrollWheelMultiplier( newvalue.asInteger() ); + return true; +} + //////////////////////////////////////////////////////////////////////////// void settings_setup_listeners() @@ -592,6 +600,7 @@ void settings_setup_listeners() gSavedSettings.getControl("AudioLevelMic")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1)); gSavedSettings.getControl("LipSyncEnabled")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1)); gSavedSettings.getControl("MediaDebugLevel")->getSignal()->connect(boost::bind(&handleMediaDebugLevelChanged, _1)); + gSavedSettings.getControl("SliderScrollWheelMultiplier")->getSignal()->connect(boost::bind(&handleSliderScrollWheelMultiplierChanged, _1)); // [RLVa:KB] - Checked: 2009-08-11 (RLVa-1.0.1h) | Added: RLVa-1.0.1h if (gSavedSettings.controlExists(RLV_SETTING_ENABLELEGACYNAMING)) -- cgit v1.1