aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2011-03-09 20:37:53 -0700
committerMcCabe Maxsted2011-03-09 20:37:53 -0700
commit16ce373d14199b94729caffcb099d8a6bd37f882 (patch)
treebd513a4f6107d57f7f7a5fe1552852f8fccc277f /linden/indra/newview/llviewerwindow.cpp
parentFixed windows compile error (diff)
downloadmeta-impy-16ce373d14199b94729caffcb099d8a6bd37f882.zip
meta-impy-16ce373d14199b94729caffcb099d8a6bd37f882.tar.gz
meta-impy-16ce373d14199b94729caffcb099d8a6bd37f882.tar.bz2
meta-impy-16ce373d14199b94729caffcb099d8a6bd37f882.tar.xz
#787: Horizontal mouse scrolling support, patch by Kakurady Drakenar
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llviewerwindow.cpp58
1 files changed, 58 insertions, 0 deletions
diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp
index 920d42e..b4ef3ff 100644
--- a/linden/indra/newview/llviewerwindow.cpp
+++ b/linden/indra/newview/llviewerwindow.cpp
@@ -1134,6 +1134,10 @@ void LLViewerWindow::handleScrollWheel(LLWindow *window, S32 clicks)
1134{ 1134{
1135 handleScrollWheel( clicks ); 1135 handleScrollWheel( clicks );
1136} 1136}
1137void LLViewerWindow::handleHScrollWheel(LLWindow *window, S32 clicks)
1138{
1139 handleHScrollWheel( clicks );
1140}
1137 1141
1138void LLViewerWindow::handleWindowBlock(LLWindow *window) 1142void LLViewerWindow::handleWindowBlock(LLWindow *window)
1139{ 1143{
@@ -2486,6 +2490,60 @@ void LLViewerWindow::handleScrollWheel(S32 clicks)
2486 return; 2490 return;
2487} 2491}
2488 2492
2493void LLViewerWindow::handleHScrollWheel(S32 clicks)
2494{
2495 LLView::sMouseHandlerMessage.clear();
2496
2497 gMouseIdleTimer.reset();
2498
2499 // Hide tooltips
2500 if( mToolTip )
2501 {
2502 mToolTip->setVisible( FALSE );
2503 }
2504
2505 LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture();
2506 if( mouse_captor )
2507 {
2508 S32 local_x;
2509 S32 local_y;
2510 mouse_captor->screenPointToLocal( mCurrentMousePoint.mX, mCurrentMousePoint.mY, &local_x, &local_y );
2511 mouse_captor->handleHScrollWheel(local_x, local_y, clicks);
2512 if (LLView::sDebugMouseHandling)
2513 {
2514 llinfos << "Tilt Wheel handled by captor " << mouse_captor->getName() << llendl;
2515 }
2516 return;
2517 }
2518
2519 LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl();
2520 if (top_ctrl)
2521 {
2522 S32 local_x;
2523 S32 local_y;
2524 top_ctrl->screenPointToLocal( mCurrentMousePoint.mX, mCurrentMousePoint.mY, &local_x, &local_y );
2525 if (top_ctrl->handleHScrollWheel(local_x, local_y, clicks)) return;
2526 }
2527
2528 if (mRootView->handleHScrollWheel(mCurrentMousePoint.mX, mCurrentMousePoint.mY, clicks) )
2529 {
2530 if (LLView::sDebugMouseHandling)
2531 {
2532 llinfos << "Tilt Wheel" << LLView::sMouseHandlerMessage << llendl;
2533 }
2534 return;
2535 }
2536 else if (LLView::sDebugMouseHandling)
2537 {
2538 llinfos << "Tilt Wheel not handled by view" << llendl;
2539 }
2540
2541
2542 gAgent.handleHScrollWheel(clicks);
2543
2544 return;
2545}
2546
2489void LLViewerWindow::moveCursorToCenter() 2547void LLViewerWindow::moveCursorToCenter()
2490{ 2548{
2491 S32 x = mVirtualWindowRect.getWidth() / 2; 2549 S32 x = mVirtualWindowRect.getWidth() / 2;