diff options
Diffstat (limited to 'linden/indra/newview/lltoolpie.cpp')
-rw-r--r-- | linden/indra/newview/lltoolpie.cpp | 72 |
1 files changed, 57 insertions, 15 deletions
diff --git a/linden/indra/newview/lltoolpie.cpp b/linden/indra/newview/lltoolpie.cpp index 27d1c4c..b32169d 100644 --- a/linden/indra/newview/lltoolpie.cpp +++ b/linden/indra/newview/lltoolpie.cpp | |||
@@ -165,6 +165,15 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) | |||
165 | // If it's a left-click, and we have a special action, do it. | 165 | // If it's a left-click, and we have a special action, do it. |
166 | if (useClickAction(always_show, mask, object, parent)) | 166 | if (useClickAction(always_show, mask, object, parent)) |
167 | { | 167 | { |
168 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0f | ||
169 | // Block left-click special actions (fallback code really since LLToolSelect::handleObjectSelection() wouldn't select it anyway) | ||
170 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && | ||
171 | (dist_vec_squared(gAgent.getPositionAgent(), mPick.mIntersection) > 1.5f * 1.5f) ) | ||
172 | { | ||
173 | return TRUE; | ||
174 | } | ||
175 | // [/RLVa:KB] | ||
176 | |||
168 | mClickAction = 0; | 177 | mClickAction = 0; |
169 | if (object && object->getClickAction()) | 178 | if (object && object->getClickAction()) |
170 | { | 179 | { |
@@ -182,7 +191,7 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) | |||
182 | // nothing | 191 | // nothing |
183 | break; | 192 | break; |
184 | case CLICK_ACTION_SIT: | 193 | case CLICK_ACTION_SIT: |
185 | if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->mIsSitting)) // agent not already sitting | 194 | if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->mIsSitting) && !gSavedSettings.getBOOL("BlockClickSit")) // agent not already sitting |
186 | { | 195 | { |
187 | handle_sit_or_stand(); | 196 | handle_sit_or_stand(); |
188 | return TRUE; | 197 | return TRUE; |
@@ -344,7 +353,22 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) | |||
344 | //gMutePieMenu->setLabel("Mute"); | 353 | //gMutePieMenu->setLabel("Mute"); |
345 | } | 354 | } |
346 | 355 | ||
347 | gPieAvatar->show(x, y, mPieMouseButtonDown); | 356 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-0.2.0f |
357 | #ifdef RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK | ||
358 | // If we have an empty selection under @fartouch=n don't show the pie menu but play the "operation block" sound | ||
359 | if ( (!gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) || (!LLSelectMgr::getInstance()->getSelection()->isEmpty()) ) | ||
360 | { | ||
361 | #endif // RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK | ||
362 | gPieAvatar->show(x, y, mPieMouseButtonDown); | ||
363 | #ifdef RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK | ||
364 | } | ||
365 | else | ||
366 | { | ||
367 | make_ui_sound("UISndInvalidOp"); | ||
368 | } | ||
369 | #endif // RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK | ||
370 | // [/RLVa:KB] | ||
371 | |||
348 | } | 372 | } |
349 | else if (object->isAttachment() && !object->isHUDAttachment()) | 373 | else if (object->isAttachment() && !object->isHUDAttachment()) |
350 | { | 374 | { |
@@ -374,15 +398,32 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) | |||
374 | //gMuteObjectPieMenu->setLabel("Mute"); | 398 | //gMuteObjectPieMenu->setLabel("Mute"); |
375 | } | 399 | } |
376 | 400 | ||
377 | gPieObject->show(x, y, mPieMouseButtonDown); | 401 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-0.2.0f |
378 | 402 | #ifdef RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK | |
379 | // VEFFECT: ShowPie object | 403 | // If we have an empty selection under @fartouch=n don't show the pie menu but play the "operation block" sound |
380 | // Don't show when you click on someone else, it freaks them | 404 | // (not entirely accurate in case of Tools / Select Only XXX [see LLToolSelect::handleObjectSelection()] |
381 | // out. | 405 | if ( (!gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) || (!LLSelectMgr::getInstance()->getSelection()->isEmpty()) ) |
382 | LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_SPHERE, TRUE); | 406 | { |
383 | effectp->setPositionGlobal(mPick.mPosGlobal); | 407 | #endif // RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK |
384 | effectp->setColor(LLColor4U(gAgent.getEffectColor())); | 408 | // [/RLVa:KB] |
385 | effectp->setDuration(0.25f); | 409 | gPieObject->show(x, y, mPieMouseButtonDown); |
410 | |||
411 | // VEFFECT: ShowPie object | ||
412 | // Don't show when you click on someone else, it freaks them | ||
413 | // out. | ||
414 | LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_SPHERE, TRUE); | ||
415 | effectp->setPositionGlobal(mPick.mPosGlobal); | ||
416 | effectp->setColor(LLColor4U(gAgent.getEffectColor())); | ||
417 | effectp->setDuration(0.25f); | ||
418 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-0.2.0f | ||
419 | #ifdef RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK | ||
420 | } | ||
421 | else | ||
422 | { | ||
423 | make_ui_sound("UISndInvalidOp"); | ||
424 | } | ||
425 | #endif // RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK | ||
426 | // [/RLVa:KB] | ||
386 | } | 427 | } |
387 | } | 428 | } |
388 | 429 | ||
@@ -635,7 +676,7 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask) | |||
635 | llinfos << "LLToolPie handleDoubleClick (becoming mouseDown)" << llendl; | 676 | llinfos << "LLToolPie handleDoubleClick (becoming mouseDown)" << llendl; |
636 | } | 677 | } |
637 | 678 | ||
638 | if (gSavedSettings.getBOOL("DoubleClickAutoPilot")) | 679 | if (gSavedSettings.getBOOL("DoubleClickAutoPilot") || gSavedSettings.getBOOL("DoubleClickTeleport")) |
639 | { | 680 | { |
640 | if (mPick.mPickType == LLPickInfo::PICK_LAND | 681 | if (mPick.mPickType == LLPickInfo::PICK_LAND |
641 | && !mPick.mPosGlobal.isExactlyZero()) | 682 | && !mPick.mPosGlobal.isExactlyZero()) |
@@ -646,9 +687,10 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask) | |||
646 | else if (mPick.mObjectID.notNull() | 687 | else if (mPick.mObjectID.notNull() |
647 | && !mPick.mPosGlobal.isExactlyZero()) | 688 | && !mPick.mPosGlobal.isExactlyZero()) |
648 | { | 689 | { |
649 | // Hit an object | 690 | //Zwagoth: No more teleport to HUD attachments. >:o |
650 | // HACK: Call the last hit position the point we hit on the object | 691 | if(mPick.getObject().notNull() && mPick.getObject()->isHUDAttachment()) |
651 | //gLastHitPosGlobal += gLastHitObjectOffset; | 692 | return FALSE; |
693 | |||
652 | handle_go_to(); | 694 | handle_go_to(); |
653 | return TRUE; | 695 | return TRUE; |
654 | } | 696 | } |