summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/llvirtualtrackball.cpp9
-rw-r--r--indra/llui/llvirtualtrackball.h6
2 files changed, 11 insertions, 4 deletions
diff --git a/indra/llui/llvirtualtrackball.cpp b/indra/llui/llvirtualtrackball.cpp
index a24c5a420d..e73bba57bb 100644
--- a/indra/llui/llvirtualtrackball.cpp
+++ b/indra/llui/llvirtualtrackball.cpp
@@ -321,7 +321,7 @@ BOOL LLVirtualTrackball::handleHover(S32 x, S32 y, MASK mask)
{
if (hasMouseCapture())
{
- if (mask == MASK_CONTROL)
+ if (mDragMode == DRAG_SCROLL)
{ // trackball (move to roll) mode
LLQuaternion delta;
@@ -394,7 +394,7 @@ BOOL LLVirtualTrackball::handleMouseUp(S32 x, S32 y, MASK mask)
gFocusMgr.setMouseCapture(NULL);
make_ui_sound("UISndClickRelease");
}
- return TRUE;
+ return LLView::handleMouseUp(x, y, mask);
}
BOOL LLVirtualTrackball::handleMouseDown(S32 x, S32 y, MASK mask)
@@ -404,9 +404,10 @@ BOOL LLVirtualTrackball::handleMouseDown(S32 x, S32 y, MASK mask)
mPrevX = x;
mPrevY = y;
gFocusMgr.setMouseCapture(this);
+ mDragMode = (mask == MASK_CONTROL) ? DRAG_SCROLL : DRAG_SET;
make_ui_sound("UISndClick");
}
- return TRUE;
+ return LLView::handleMouseDown(x, y, mask);
}
BOOL LLVirtualTrackball::handleRightMouseDown(S32 x, S32 y, MASK mask)
@@ -416,7 +417,7 @@ BOOL LLVirtualTrackball::handleRightMouseDown(S32 x, S32 y, MASK mask)
//make_ui_sound("UISndClick");
}
- return TRUE;
+ return LLView::handleRightMouseDown(x, y, mask);
}
BOOL LLVirtualTrackball::handleKeyHere(KEY key, MASK mask)
diff --git a/indra/llui/llvirtualtrackball.h b/indra/llui/llvirtualtrackball.h
index c1b66550bb..48ddb7f4d9 100644
--- a/indra/llui/llvirtualtrackball.h
+++ b/indra/llui/llvirtualtrackball.h
@@ -44,6 +44,11 @@ public:
SUN,
MOON
};
+ enum DragMode
+ {
+ DRAG_SET,
+ DRAG_SCROLL
+ };
struct Params
: public LLInitParam::Block<Params, LLUICtrl::Params>
@@ -140,6 +145,7 @@ private:
LLQuaternion mValue;
ThumbMode mThumbMode;
+ DragMode mDragMode;
F32 mIncrementMouse;
F32 mIncrementBtn;