diff options
| author | Karl Steifvater <qarl@lindenlab.com> | 2008-07-23 21:20:19 +0000 |
|---|---|---|
| committer | Karl Steifvater <qarl@lindenlab.com> | 2008-07-23 21:20:19 +0000 |
| commit | 52562e2e664c70dcd476291820ac02b893e489b8 (patch) | |
| tree | 5137f49f194a6a28f290385c38f689d77656b2e0 /indra/newview/lltoolpipette.cpp | |
| parent | bc39ad916e8f23ffae12184eee675aa7c1be2ca9 (diff) | |
svn merge -r92720:92721 svn+ssh://svn.lindenlab.com/svn/linden/branches/uv-picking-merge
QAR-698 / DEV-9985 add touch "position" information to touch-events in LSL
Diffstat (limited to 'indra/newview/lltoolpipette.cpp')
| -rw-r--r-- | indra/newview/lltoolpipette.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/indra/newview/lltoolpipette.cpp b/indra/newview/lltoolpipette.cpp index a565e4361b..9456cd4472 100644 --- a/indra/newview/lltoolpipette.cpp +++ b/indra/newview/lltoolpipette.cpp @@ -67,9 +67,8 @@ BOOL LLToolPipette::handleMouseDown(S32 x, S32 y, MASK mask) { mSuccess = TRUE; mTooltipMsg.clear(); - gPickFaces = TRUE; setMouseCapture(TRUE); - gViewerWindow->hitObjectOrLandGlobalAsync(x, y, mask, pickCallback); + gViewerWindow->pickAsync(x, y, mask, pickCallback); return TRUE; } @@ -88,8 +87,7 @@ BOOL LLToolPipette::handleHover(S32 x, S32 y, MASK mask) gViewerWindow->setCursor(mSuccess ? UI_CURSOR_PIPETTE : UI_CURSOR_NO); if (hasMouseCapture()) // mouse button is down { - gPickFaces = TRUE; - gViewerWindow->hitObjectOrLandGlobalAsync(x, y, mask, pickCallback); + gViewerWindow->pickAsync(x, y, mask, pickCallback); return TRUE; } return FALSE; @@ -107,19 +105,19 @@ BOOL LLToolPipette::handleToolTip(S32 x, S32 y, std::string& msg, LLRect *sticky return TRUE; } -void LLToolPipette::pickCallback(S32 x, S32 y, MASK mask) +void LLToolPipette::pickCallback(const LLPickInfo& pick_info) { - LLViewerObject* hit_obj = gViewerWindow->lastObjectHit(); + LLViewerObject* hit_obj = pick_info.getObject(); LLSelectMgr::getInstance()->unhighlightAll(); // if we clicked on a face of a valid prim, save off texture entry data if (hit_obj && hit_obj->getPCode() == LL_PCODE_VOLUME && - gLastHitObjectFace != -1) + pick_info.mObjectFace != -1) { //TODO: this should highlight the selected face only LLSelectMgr::getInstance()->highlightObjectOnly(hit_obj); - LLToolPipette::getInstance()->mTextureEntry = *hit_obj->getTE(gLastHitObjectFace); + LLToolPipette::getInstance()->mTextureEntry = *hit_obj->getTE(pick_info.mObjectFace); if (LLToolPipette::getInstance()->mSelectCallback) { LLToolPipette::getInstance()->mSelectCallback(LLToolPipette::getInstance()->mTextureEntry, LLToolPipette::getInstance()->mUserData); |
