aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-10-03 22:21:18 -0700
committerMcCabe Maxsted2009-10-03 22:21:18 -0700
commite1ca383cf4023b3a8b16a681e1d433c38ba836e8 (patch)
tree186ef8433370c52b888f2f0062c3b5dd918d84ef
parentFixed extern C issue in llmediaimplgstreamer.h for Windows (diff)
downloadmeta-impy-e1ca383cf4023b3a8b16a681e1d433c38ba836e8.zip
meta-impy-e1ca383cf4023b3a8b16a681e1d433c38ba836e8.tar.gz
meta-impy-e1ca383cf4023b3a8b16a681e1d433c38ba836e8.tar.bz2
meta-impy-e1ca383cf4023b3a8b16a681e1d433c38ba836e8.tar.xz
Added confirmation alerts for double-click tp and auto-pilot
Diffstat (limited to '')
-rw-r--r--ChangeLog.txt6
-rw-r--r--linden/indra/newview/llviewermenu.cpp73
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/alerts.xml32
3 files changed, 83 insertions, 28 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 3f4b3e7..5792f61 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,5 +1,11 @@
12009-10-03 McCabe Maxsted <hakushakukun@gmail.com> 12009-10-03 McCabe Maxsted <hakushakukun@gmail.com>
2 2
3 * Added confirmation alerts for double-click tp and auto-pilot.
4
5 modified: linden/indra/newview/llviewermenu.cpp
6 modified: linden/indra/newview/skins/default/xui/en-us/alerts.xml
7
8
3 * Fixed extern C issue in llmediaimplgstreamer.h for Windows. 9 * Fixed extern C issue in llmediaimplgstreamer.h for Windows.
4 10
5 modified: linden/indra/llmedia/llmediaimplgstreamer.h 11 modified: linden/indra/llmedia/llmediaimplgstreamer.h
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp
index f9ae401..d11bc02 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -494,6 +494,7 @@ BOOL enable_detach(void*);
494BOOL enable_region_owner(void*); 494BOOL enable_region_owner(void*);
495void menu_toggle_attached_lights(void* user_data); 495void menu_toggle_attached_lights(void* user_data);
496void menu_toggle_attached_particles(void* user_data); 496void menu_toggle_attached_particles(void* user_data);
497static void handle_go_to_callback(S32 option, void *userdata);
497 498
498class LLMenuParcelObserver : public LLParcelObserver 499class LLMenuParcelObserver : public LLParcelObserver
499{ 500{
@@ -2392,45 +2393,63 @@ bool handle_go_to()
2392 } 2393 }
2393// [/RLVa:KB] 2394// [/RLVa:KB]
2394 2395
2395 // JAMESDEBUG try simulator autopilot
2396 std::vector<std::string> strings;
2397 std::string val;
2398 LLVector3d pos = LLToolPie::getInstance()->getPick().mPosGlobal;
2399 if (gSavedSettings.getBOOL("DoubleClickTeleport")) 2396 if (gSavedSettings.getBOOL("DoubleClickTeleport"))
2400 { 2397 {
2401 LLVector3d hips_offset(0.0f, 0.0f, 1.2f); 2398 gViewerWindow->alertXml("ConfirmDoubleClickTP", handle_go_to_callback, (void*)LLToolPie::getInstance());
2402 gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
2403 gAgent.teleportViaLocation(pos + hips_offset);
2404 } 2399 }
2405 else 2400 else if (gSavedSettings.getBOOL("DoubleClickAutoPilot"))
2401 {
2402 gViewerWindow->alertXml("ConfirmAutoPilot", handle_go_to_callback, (void*)LLToolPie::getInstance());
2403 }
2404 return true;
2405}
2406
2407//static
2408void handle_go_to_callback(S32 option, void *userdata)
2409{
2410 if (option == 0)
2406 { 2411 {
2412 LLToolPie* pie = (LLToolPie*)userdata;
2413
2407 // JAMESDEBUG try simulator autopilot 2414 // JAMESDEBUG try simulator autopilot
2408 std::vector<std::string> strings; 2415 std::vector<std::string> strings;
2409 std::string val; 2416 std::string val;
2410 val = llformat("%g", pos.mdV[VX]); 2417 LLVector3d pos = pie->getPick().mPosGlobal;
2411 strings.push_back(val); 2418 if (gSavedSettings.getBOOL("DoubleClickTeleport"))
2412 val = llformat("%g", pos.mdV[VY]);
2413 strings.push_back(val);
2414 val = llformat("%g", pos.mdV[VZ]);
2415 strings.push_back(val);
2416 send_generic_message("autopilot", strings);
2417
2418 LLViewerParcelMgr::getInstance()->deselectLand();
2419
2420 if (gAgent.getAvatarObject() && !gSavedSettings.getBOOL("AutoPilotLocksCamera"))
2421 { 2419 {
2422 gAgent.setFocusGlobal(gAgent.getFocusTargetGlobal(), gAgent.getAvatarObject()->getID()); 2420 LLVector3d hips_offset(0.0f, 0.0f, 1.2f);
2421 gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
2422 gAgent.teleportViaLocation(pos + hips_offset);
2423 } 2423 }
2424 else 2424 else
2425 { 2425 {
2426 // Snap camera back to behind avatar 2426 // JAMESDEBUG try simulator autopilot
2427 gAgent.setFocusOnAvatar(TRUE, ANIMATE); 2427 std::vector<std::string> strings;
2428 } 2428 std::string val;
2429 val = llformat("%g", pos.mdV[VX]);
2430 strings.push_back(val);
2431 val = llformat("%g", pos.mdV[VY]);
2432 strings.push_back(val);
2433 val = llformat("%g", pos.mdV[VZ]);
2434 strings.push_back(val);
2435 send_generic_message("autopilot", strings);
2436
2437 LLViewerParcelMgr::getInstance()->deselectLand();
2438
2439 if (gAgent.getAvatarObject() && !gSavedSettings.getBOOL("AutoPilotLocksCamera"))
2440 {
2441 gAgent.setFocusGlobal(gAgent.getFocusTargetGlobal(), gAgent.getAvatarObject()->getID());
2442 }
2443 else
2444 {
2445 // Snap camera back to behind avatar
2446 gAgent.setFocusOnAvatar(TRUE, ANIMATE);
2447 }
2429 2448
2430 // Could be first use 2449 // Could be first use
2431 LLFirstUse::useGoTo(); 2450 LLFirstUse::useGoTo();
2451 }
2432 } 2452 }
2433 return true;
2434} 2453}
2435 2454
2436class LLGoToObject : public view_listener_t 2455class LLGoToObject : public view_listener_t
diff --git a/linden/indra/newview/skins/default/xui/en-us/alerts.xml b/linden/indra/newview/skins/default/xui/en-us/alerts.xml
index acac138..d0ac192 100644
--- a/linden/indra/newview/skins/default/xui/en-us/alerts.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/alerts.xml
@@ -5093,7 +5093,37 @@ Would you like to visit the Second Life website to set this up?
5093 </message> 5093 </message>
5094 </alert> 5094 </alert>
5095 5095
5096 <alert modal="true" name="ConfirmTeleportHome"> 5096 <alert modal="true" name="ConfirmAutoPilot">
5097 <message name="message">
5098 Are you sure you want to move here?
5099 </message>
5100 <ignore name="ignore">
5101 When using auto-pilot
5102 </ignore>
5103 <option name="Move">
5104 Move
5105 </option>
5106 <option name="Cancel">
5107 Cancel
5108 </option>
5109 </alert>
5110
5111 <alert modal="true" name="ConfirmDoubleClickTP">
5112 <message name="message">
5113 Are you sure you want to teleport here?
5114 </message>
5115 <ignore name="ignore">
5116 When double-click teleporting
5117 </ignore>
5118 <option name="Teleport">
5119 Teleport
5120 </option>
5121 <option name="Cancel">
5122 Cancel
5123 </option>
5124 </alert>
5125
5126 <alert modal="true" name="ConfirmTeleportHome">
5097 <message name="message"> 5127 <message name="message">
5098 Are you sure you want to teleport home? 5128 Are you sure you want to teleport home?
5099 </message> 5129 </message>