aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview
diff options
context:
space:
mode:
authorJacek Antonelli2009-11-02 21:36:23 -0600
committerJacek Antonelli2009-11-02 22:04:43 -0600
commitd8b08f5548ca0b63becd4b303575d20502bd832a (patch)
tree62dc6cfcbdd32e5b1f9ba557974e959a2362bf95 /linden/indra/newview
parent"Go Here" in pie menu no longer asks for confirmation. (diff)
downloadmeta-impy-d8b08f5548ca0b63becd4b303575d20502bd832a.zip
meta-impy-d8b08f5548ca0b63becd4b303575d20502bd832a.tar.gz
meta-impy-d8b08f5548ca0b63becd4b303575d20502bd832a.tar.bz2
meta-impy-d8b08f5548ca0b63becd4b303575d20502bd832a.tar.xz
Added "DoubleClickAction" and "GoAction" settings.
Together they replace "DoubleClickAutopilot" and "DoubleClickTeleport".
Diffstat (limited to 'linden/indra/newview')
-rw-r--r--linden/indra/newview/app_settings/settings.xml30
-rw-r--r--linden/indra/newview/lltoolpie.cpp35
-rw-r--r--linden/indra/newview/llviewermenu.cpp19
3 files changed, 41 insertions, 43 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index e1a6f1f..95dd186 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -2399,27 +2399,16 @@
2399 <key>Value</key> 2399 <key>Value</key>
2400 <real>1.0</real> 2400 <real>1.0</real>
2401 </map> 2401 </map>
2402 <key>DoubleClickAutoPilot</key> 2402 <key>DoubleClickAction</key>
2403 <map> 2403 <map>
2404 <key>Comment</key> 2404 <key>Comment</key>
2405 <string>Enable double-click auto pilot</string> 2405 <string>What to do when you double-click. Either "None" or "Go".</string>
2406 <key>Persist</key> 2406 <key>Persist</key>
2407 <integer>1</integer> 2407 <integer>1</integer>
2408 <key>Type</key> 2408 <key>Type</key>
2409 <string>Boolean</string> 2409 <string>String</string>
2410 <key>Value</key>
2411 <integer>0</integer>
2412 </map>
2413 <key>DoubleClickTeleport</key>
2414 <map>
2415 <key>Comment</key>
2416 <string>Enable double-click teleport</string>
2417 <key>Persist</key>
2418 <integer>1</integer>
2419 <key>Type</key>
2420 <string>Boolean</string>
2421 <key>Value</key> 2410 <key>Value</key>
2422 <integer>1</integer> 2411 <string>None</string>
2423 </map> 2412 </map>
2424 <key>DragAndDropToolTipDelay</key> 2413 <key>DragAndDropToolTipDelay</key>
2425 <map> 2414 <map>
@@ -3913,6 +3902,17 @@
3913 <key>Value</key> 3902 <key>Value</key>
3914 <integer>1024</integer> 3903 <integer>1024</integer>
3915 </map> 3904 </map>
3905 <key>GoAction</key>
3906 <map>
3907 <key>Comment</key>
3908 <string>How to move for "Go Here" or double-click move. Either "Autopilot" or "Teleport".</string>
3909 <key>Persist</key>
3910 <integer>1</integer>
3911 <key>Type</key>
3912 <string>String</string>
3913 <key>Value</key>
3914 <string>Autopilot</string>
3915 </map>
3916 <key>GridCrossSections</key> 3916 <key>GridCrossSections</key>
3917 <map> 3917 <map>
3918 <key>Comment</key> 3918 <key>Comment</key>
diff --git a/linden/indra/newview/lltoolpie.cpp b/linden/indra/newview/lltoolpie.cpp
index cda76d9..8b57011 100644
--- a/linden/indra/newview/lltoolpie.cpp
+++ b/linden/indra/newview/lltoolpie.cpp
@@ -676,7 +676,14 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask)
676 llinfos << "LLToolPie handleDoubleClick (becoming mouseDown)" << llendl; 676 llinfos << "LLToolPie handleDoubleClick (becoming mouseDown)" << llendl;
677 } 677 }
678 678
679 if (gSavedSettings.getBOOL("DoubleClickAutoPilot") || gSavedSettings.getBOOL("DoubleClickTeleport")) 679 std::string action = gSavedSettings.getString("DoubleClickAction");
680 LLStringUtil::toLower(action);
681
682 if (action == "none")
683 {
684 return FALSE;
685 }
686 else if (action == "go")
680 { 687 {
681 if (mPick.mPickType == LLPickInfo::PICK_LAND 688 if (mPick.mPickType == LLPickInfo::PICK_LAND
682 && !mPick.mPosGlobal.isExactlyZero()) 689 && !mPick.mPosGlobal.isExactlyZero())
@@ -695,32 +702,12 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask)
695 return TRUE; 702 return TRUE;
696 } 703 }
697 } 704 }
698 705 else
699 return FALSE;
700
701 /* JC - don't do go-there, because then double-clicking on physical
702 objects gets you into trouble.
703
704 // If double-click on object or land, go there.
705 LLViewerObject *object = gViewerWindow->getLastPick().getObject();
706 if (object)
707 {
708 if (object->isAvatar())
709 {
710 LLFloaterAvatarInfo::showFromAvatar(object->getID());
711 }
712 else
713 {
714 handle_go_to(NULL);
715 }
716 }
717 else if (!gLastHitPosGlobal.isExactlyZero())
718 { 706 {
719 handle_go_to(NULL); 707 llwarns << "Unhandled DoubleClickAction setting: " << action << llendl;
720 } 708 }
721 709
722 return TRUE; 710 return FALSE;
723 */
724} 711}
725 712
726 713
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp
index bd8b6ab..4732046 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -2393,11 +2393,14 @@ bool handle_go_to_confirm()
2393 } 2393 }
2394// [/RLVa:KB] 2394// [/RLVa:KB]
2395 2395
2396 if (gSavedSettings.getBOOL("DoubleClickTeleport")) 2396 std::string action = gSavedSettings.getString("GoAction");
2397 LLStringUtil::toLower(action);
2398
2399 if (action == "teleport")
2397 { 2400 {
2398 gViewerWindow->alertXml("ConfirmDoubleClickTP", handle_go_to_callback, (void*)LLToolPie::getInstance()); 2401 gViewerWindow->alertXml("ConfirmDoubleClickTP", handle_go_to_callback, (void*)LLToolPie::getInstance());
2399 } 2402 }
2400 else if (gSavedSettings.getBOOL("DoubleClickAutoPilot")) 2403 else if (action == "autopilot")
2401 { 2404 {
2402 gViewerWindow->alertXml("ConfirmAutoPilot", handle_go_to_callback, (void*)LLToolPie::getInstance()); 2405 gViewerWindow->alertXml("ConfirmAutoPilot", handle_go_to_callback, (void*)LLToolPie::getInstance());
2403 } 2406 }
@@ -2431,13 +2434,17 @@ void handle_go_to_callback(S32 option, void *userdata)
2431 std::vector<std::string> strings; 2434 std::vector<std::string> strings;
2432 std::string val; 2435 std::string val;
2433 LLVector3d pos = pie->getPick().mPosGlobal; 2436 LLVector3d pos = pie->getPick().mPosGlobal;
2434 if (gSavedSettings.getBOOL("DoubleClickTeleport")) 2437
2438 std::string action = gSavedSettings.getString("GoAction");
2439 LLStringUtil::toLower(action);
2440
2441 if (action == "teleport")
2435 { 2442 {
2436 LLVector3d hips_offset(0.0f, 0.0f, 1.2f); 2443 LLVector3d hips_offset(0.0f, 0.0f, 1.2f);
2437 gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); 2444 gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
2438 gAgent.teleportViaLocation(pos + hips_offset); 2445 gAgent.teleportViaLocation(pos + hips_offset);
2439 } 2446 }
2440 else 2447 else if (action == "autopilot")
2441 { 2448 {
2442 // JAMESDEBUG try simulator autopilot 2449 // JAMESDEBUG try simulator autopilot
2443 std::vector<std::string> strings; 2450 std::vector<std::string> strings;
@@ -2465,6 +2472,10 @@ void handle_go_to_callback(S32 option, void *userdata)
2465 // Could be first use 2472 // Could be first use
2466 LLFirstUse::useGoTo(); 2473 LLFirstUse::useGoTo();
2467 } 2474 }
2475 else
2476 {
2477 llwarns << "Unhandled GoAction setting: " << action << llendl;
2478 }
2468 } 2479 }
2469} 2480}
2470 2481