diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/llspinctrl.cpp | 5 | ||||
-rw-r--r-- | indra/llui/llspinctrl.h | 1 | ||||
-rw-r--r-- | indra/newview/app_settings/settings.xml | 13 | ||||
-rw-r--r-- | indra/newview/llviewermedia.cpp | 12 |
4 files changed, 29 insertions, 2 deletions
diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp index 491cd7b6f3..9c2cbd4957 100644 --- a/indra/llui/llspinctrl.cpp +++ b/indra/llui/llspinctrl.cpp @@ -457,3 +457,8 @@ BOOL LLSpinCtrl::handleKeyHere(KEY key, MASK mask) return FALSE; } +BOOL LLSpinCtrl::handleDoubleClick(S32 x, S32 y, MASK mask) +{ + // just treat a double click as a second click + return handleMouseDown(x, y, mask); +}
\ No newline at end of file diff --git a/indra/llui/llspinctrl.h b/indra/llui/llspinctrl.h index 00d6f86f83..06201255d2 100644 --- a/indra/llui/llspinctrl.h +++ b/indra/llui/llspinctrl.h @@ -94,6 +94,7 @@ public: virtual BOOL handleScrollWheel(S32 x,S32 y,S32 clicks); virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask); void onEditorCommit(const LLSD& data); static void onEditorGainFocus(LLFocusableElement* caller, void *userdata); diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index a6dbe00759..6f11a6d616 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5838,7 +5838,18 @@ <key>Value</key> <real>1.0</real> </map> - <key>RecentItemsSortOrder</key> + <key>MediaRollOffFactor</key> + <map> + <key>Comment</key> + <string>Multiplier to change rate of media attenuation</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>10.0</real> + </map> + <key>RecentItemsSortOrder</key> <map> <key>Comment</key> <string>Specifies sort key for recent inventory items (+0 = name, +1 = date, +2 = folders always by name, +4 = system folders to top)</string> diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 3c0345df90..fd2bb0fdf9 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1914,7 +1914,15 @@ void LLViewerMediaImpl::updateVolume() { if(mMediaSource) { - mMediaSource->setVolume(mRequestedVolume * LLViewerMedia::getVolume()); + F32 attenuation_multiplier = 1.0; + + if (mProximityDistance > 0) + { + // the attenuation multiplier should never be more than one since that would increase volume + attenuation_multiplier = llmin(1.0, gSavedSettings.getF32("MediaRollOffFactor")/mProximityDistance); + } + + mMediaSource->setVolume(mRequestedVolume * LLViewerMedia::getVolume() * attenuation_multiplier); } } @@ -2427,6 +2435,8 @@ void LLViewerMediaImpl::update() } else { + updateVolume(); + // If we didn't just create the impl, it may need to get cookie updates. if(!sUpdatedCookies.empty()) { |