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 60e40dd..f6c2eef 100644 --- a/linden/indra/newview/lltoolpie.cpp +++ b/linden/indra/newview/lltoolpie.cpp | |||
@@ -166,6 +166,15 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) | |||
166 | // If it's a left-click, and we have a special action, do it. | 166 | // If it's a left-click, and we have a special action, do it. |
167 | if (useClickAction(always_show, mask, object, parent)) | 167 | if (useClickAction(always_show, mask, object, parent)) |
168 | { | 168 | { |
169 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0f | ||
170 | // Block left-click special actions (fallback code really since LLToolSelect::handleObjectSelection() wouldn't select it anyway) | ||
171 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && | ||
172 | (dist_vec_squared(gAgent.getPositionAgent(), mPick.mIntersection) > 1.5f * 1.5f) ) | ||
173 | { | ||
174 | return TRUE; | ||
175 | } | ||
176 | // [/RLVa:KB] | ||
177 | |||
169 | mClickAction = 0; | 178 | mClickAction = 0; |
170 | if (object && object->getClickAction()) | 179 | if (object && object->getClickAction()) |
171 | { | 180 | { |
@@ -182,7 +191,7 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) | |||
182 | // touch behavior down below... | 191 | // touch behavior down below... |
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; |
@@ -362,7 +371,22 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) | |||
362 | //gMutePieMenu->setLabel("Mute"); | 371 | //gMutePieMenu->setLabel("Mute"); |
363 | } | 372 | } |
364 | 373 | ||
365 | gPieAvatar->show(x, y, mPieMouseButtonDown); | 374 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-0.2.0f |
375 | #ifdef RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK | ||
376 | // If we have an empty selection under @fartouch=n don't show the pie menu but play the "operation block" sound | ||
377 | if ( (!gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) || (!LLSelectMgr::getInstance()->getSelection()->isEmpty()) ) | ||
378 | { | ||
379 | #endif // RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK | ||
380 | gPieAvatar->show(x, y, mPieMouseButtonDown); | ||
381 | #ifdef RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK | ||
382 | } | ||
383 | else | ||
384 | { | ||
385 | make_ui_sound("UISndInvalidOp"); | ||
386 | } | ||
387 | #endif // RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK | ||
388 | // [/RLVa:KB] | ||
389 | |||
366 | } | 390 | } |
367 | else if (object->isAttachment() && !object->isHUDAttachment()) | 391 | else if (object->isAttachment() && !object->isHUDAttachment()) |
368 | { | 392 | { |
@@ -392,15 +416,32 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) | |||
392 | //gMuteObjectPieMenu->setLabel("Mute"); | 416 | //gMuteObjectPieMenu->setLabel("Mute"); |
393 | } | 417 | } |
394 | 418 | ||
395 | gPieObject->show(x, y, mPieMouseButtonDown); | 419 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-0.2.0f |
396 | 420 | #ifdef RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK | |
397 | // VEFFECT: ShowPie object | 421 | // If we have an empty selection under @fartouch=n don't show the pie menu but play the "operation block" sound |
398 | // Don't show when you click on someone else, it freaks them | 422 | // (not entirely accurate in case of Tools / Select Only XXX [see LLToolSelect::handleObjectSelection()] |
399 | // out. | 423 | if ( (!gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) || (!LLSelectMgr::getInstance()->getSelection()->isEmpty()) ) |
400 | LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_SPHERE, TRUE); | 424 | { |
401 | effectp->setPositionGlobal(mPick.mPosGlobal); | 425 | #endif // RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK |
402 | effectp->setColor(LLColor4U(gAgent.getEffectColor())); | 426 | // [/RLVa:KB] |
403 | effectp->setDuration(0.25f); | 427 | gPieObject->show(x, y, mPieMouseButtonDown); |
428 | |||
429 | // VEFFECT: ShowPie object | ||
430 | // Don't show when you click on someone else, it freaks them | ||
431 | // out. | ||
432 | LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_SPHERE, TRUE); | ||
433 | effectp->setPositionGlobal(mPick.mPosGlobal); | ||
434 | effectp->setColor(LLColor4U(gAgent.getEffectColor())); | ||
435 | effectp->setDuration(0.25f); | ||
436 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-0.2.0f | ||
437 | #ifdef RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK | ||
438 | } | ||
439 | else | ||
440 | { | ||
441 | make_ui_sound("UISndInvalidOp"); | ||
442 | } | ||
443 | #endif // RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK | ||
444 | // [/RLVa:KB] | ||
404 | } | 445 | } |
405 | } | 446 | } |
406 | 447 | ||
@@ -653,7 +694,7 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask) | |||
653 | llinfos << "LLToolPie handleDoubleClick (becoming mouseDown)" << llendl; | 694 | llinfos << "LLToolPie handleDoubleClick (becoming mouseDown)" << llendl; |
654 | } | 695 | } |
655 | 696 | ||
656 | if (gSavedSettings.getBOOL("DoubleClickAutoPilot")) | 697 | if (gSavedSettings.getBOOL("DoubleClickAutoPilot") || gSavedSettings.getBOOL("DoubleClickTeleport")) |
657 | { | 698 | { |
658 | if (mPick.mPickType == LLPickInfo::PICK_LAND | 699 | if (mPick.mPickType == LLPickInfo::PICK_LAND |
659 | && !mPick.mPosGlobal.isExactlyZero()) | 700 | && !mPick.mPosGlobal.isExactlyZero()) |
@@ -664,9 +705,10 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask) | |||
664 | else if (mPick.mObjectID.notNull() | 705 | else if (mPick.mObjectID.notNull() |
665 | && !mPick.mPosGlobal.isExactlyZero()) | 706 | && !mPick.mPosGlobal.isExactlyZero()) |
666 | { | 707 | { |
667 | // Hit an object | 708 | //Zwagoth: No more teleport to HUD attachments. >:o |
668 | // HACK: Call the last hit position the point we hit on the object | 709 | if(mPick.getObject().notNull() && mPick.getObject()->isHUDAttachment()) |
669 | //gLastHitPosGlobal += gLastHitObjectOffset; | 710 | return FALSE; |
711 | |||
670 | handle_go_to(); | 712 | handle_go_to(); |
671 | return TRUE; | 713 | return TRUE; |
672 | } | 714 | } |