From 16ce373d14199b94729caffcb099d8a6bd37f882 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Wed, 9 Mar 2011 20:37:53 -0700 Subject: #787: Horizontal mouse scrolling support, patch by Kakurady Drakenar --- linden/indra/newview/llfloaterimagepreview.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'linden/indra/newview/llfloaterimagepreview.cpp') diff --git a/linden/indra/newview/llfloaterimagepreview.cpp b/linden/indra/newview/llfloaterimagepreview.cpp index aa8a94f..e792f8c 100644 --- a/linden/indra/newview/llfloaterimagepreview.cpp +++ b/linden/indra/newview/llfloaterimagepreview.cpp @@ -616,6 +616,22 @@ BOOL LLFloaterImagePreview::handleScrollWheel(S32 x, S32 y, S32 clicks) return TRUE; } +BOOL LLFloaterImagePreview::handleHScrollWheel(S32 x, S32 y, S32 clicks) +{ + const F32 RAD_PER_CLICK = -F_PI / 16.0f; + + if (mPreviewRect.pointInRect(x, y) && mAvatarPreview) + { + mAvatarPreview->rotate(RAD_PER_CLICK * clicks, 0); + mAvatarPreview->refresh(); + + mSculptedPreview->rotate(RAD_PER_CLICK * clicks, 0); + mSculptedPreview->refresh(); + } + + return TRUE; +} + //----------------------------------------------------------------------------- // onMouseCaptureLost() //----------------------------------------------------------------------------- -- cgit v1.1