diff options
author | Monroe Linden <monroe@lindenlab.com> | 2009-10-29 16:10:37 -0700 |
---|---|---|
committer | Monroe Linden <monroe@lindenlab.com> | 2009-10-29 16:10:37 -0700 |
commit | 8357fe51aa034d823ba2f7c0465f4f8f8065fc1a (patch) | |
tree | 0edd109b064c387cf32257961731a07086c4dcf1 /indra/newview/llpanelprimmediacontrols.cpp | |
parent | 4d1a2ef2d1d521ccdf5150f76ef5ce7597aded28 (diff) |
Added LLViewerMediaImpl::scrollWheel() to route scroll wheel events through the media impl.
The horizontal scroll arrows in the media controls now send horizontal scrollwheel events instead of arrow keys.
Diffstat (limited to 'indra/newview/llpanelprimmediacontrols.cpp')
-rw-r--r-- | indra/newview/llpanelprimmediacontrols.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index fb0b5dff1f..5ed4464c2e 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -885,11 +885,11 @@ void LLPanelPrimMediaControls::onScrollUp(void* user_data) LLPanelPrimMediaControls* this_panel = static_cast<LLPanelPrimMediaControls*> (user_data); this_panel->focusOnTarget(); - LLPluginClassMedia* plugin = this_panel->getTargetMediaPlugin(); + LLViewerMediaImpl* impl = this_panel->getTargetMediaImpl(); - if(plugin) + if(impl) { - plugin->scrollEvent(0, -1, MASK_NONE); + impl->scrollWheel(0, -1, MASK_NONE); } } void LLPanelPrimMediaControls::onScrollUpHeld(void* user_data) @@ -906,7 +906,8 @@ void LLPanelPrimMediaControls::onScrollRight(void* user_data) if(impl) { - impl->handleKeyHere(KEY_RIGHT, MASK_NONE); + impl->scrollWheel(-1, 0, MASK_NONE); +// impl->handleKeyHere(KEY_RIGHT, MASK_NONE); } } void LLPanelPrimMediaControls::onScrollRightHeld(void* user_data) @@ -924,7 +925,8 @@ void LLPanelPrimMediaControls::onScrollLeft(void* user_data) if(impl) { - impl->handleKeyHere(KEY_LEFT, MASK_NONE); + impl->scrollWheel(1, 0, MASK_NONE); +// impl->handleKeyHere(KEY_LEFT, MASK_NONE); } } void LLPanelPrimMediaControls::onScrollLeftHeld(void* user_data) @@ -938,11 +940,11 @@ void LLPanelPrimMediaControls::onScrollDown(void* user_data) LLPanelPrimMediaControls* this_panel = static_cast<LLPanelPrimMediaControls*> (user_data); this_panel->focusOnTarget(); - LLPluginClassMedia* plugin = this_panel->getTargetMediaPlugin(); + LLViewerMediaImpl* impl = this_panel->getTargetMediaImpl(); - if(plugin) + if(impl) { - plugin->scrollEvent(0, 1, MASK_NONE); + impl->scrollWheel(0, 1, MASK_NONE); } } void LLPanelPrimMediaControls::onScrollDownHeld(void* user_data) |