aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewermenu.cpp
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/llviewermenu.cpp
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/llviewermenu.cpp')
-rw-r--r--linden/indra/newview/llviewermenu.cpp19
1 files changed, 15 insertions, 4 deletions
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