diff options
author | Jacek Antonelli | 2009-09-09 11:38:26 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-09-09 11:59:42 -0500 |
commit | ced5a5f6a0e7d294f9e477409387674fcecc532c (patch) | |
tree | e7500de0806009c2955bef6af7103ac60ae1e8e0 /linden/indra/newview/llviewermenu.cpp | |
parent | Merge branch 'objectbackup' into next (diff) | |
parent | Commented out permissions button (todo: backport this if there's time) (diff) | |
download | meta-impy-ced5a5f6a0e7d294f9e477409387674fcecc532c.zip meta-impy-ced5a5f6a0e7d294f9e477409387674fcecc532c.tar.gz meta-impy-ced5a5f6a0e7d294f9e477409387674fcecc532c.tar.bz2 meta-impy-ced5a5f6a0e7d294f9e477409387674fcecc532c.tar.xz |
Merge remote branch 'mccabe/1.2.0-next' into next
Moved "Backup" pie menu item to fit "Go Here" in top-left slot.
Conflicts:
linden/indra/newview/llviewermenu.cpp
linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml
Diffstat (limited to 'linden/indra/newview/llviewermenu.cpp')
-rw-r--r-- | linden/indra/newview/llviewermenu.cpp | 169 |
1 files changed, 150 insertions, 19 deletions
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 1560414..e83bc2d 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp | |||
@@ -211,6 +211,9 @@ | |||
211 | #include "lltexlayer.h" | 211 | #include "lltexlayer.h" |
212 | #include "primbackup.h" | 212 | #include "primbackup.h" |
213 | 213 | ||
214 | #include "jcfloater_animation_list.h" | ||
215 | #include "llfloaterassetbrowser.h" | ||
216 | |||
214 | void init_client_menu(LLMenuGL* menu); | 217 | void init_client_menu(LLMenuGL* menu); |
215 | void init_server_menu(LLMenuGL* menu); | 218 | void init_server_menu(LLMenuGL* menu); |
216 | 219 | ||
@@ -2412,28 +2415,40 @@ bool handle_go_to() | |||
2412 | std::vector<std::string> strings; | 2415 | std::vector<std::string> strings; |
2413 | std::string val; | 2416 | std::string val; |
2414 | LLVector3d pos = LLToolPie::getInstance()->getPick().mPosGlobal; | 2417 | LLVector3d pos = LLToolPie::getInstance()->getPick().mPosGlobal; |
2415 | val = llformat("%g", pos.mdV[VX]); | 2418 | if (gSavedSettings.getBOOL("DoubleClickTeleport")) |
2416 | strings.push_back(val); | ||
2417 | val = llformat("%g", pos.mdV[VY]); | ||
2418 | strings.push_back(val); | ||
2419 | val = llformat("%g", pos.mdV[VZ]); | ||
2420 | strings.push_back(val); | ||
2421 | send_generic_message("autopilot", strings); | ||
2422 | |||
2423 | LLViewerParcelMgr::getInstance()->deselectLand(); | ||
2424 | |||
2425 | if (gAgent.getAvatarObject() && !gSavedSettings.getBOOL("AutoPilotLocksCamera")) | ||
2426 | { | 2419 | { |
2427 | 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); | ||
2428 | } | 2423 | } |
2429 | else | 2424 | else |
2430 | { | 2425 | { |
2431 | // Snap camera back to behind avatar | 2426 | // JAMESDEBUG try simulator autopilot |
2432 | gAgent.setFocusOnAvatar(TRUE, ANIMATE); | 2427 | std::vector<std::string> strings; |
2433 | } | 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); | ||
2434 | 2436 | ||
2435 | // Could be first use | 2437 | LLViewerParcelMgr::getInstance()->deselectLand(); |
2436 | LLFirstUse::useGoTo(); | 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 | } | ||
2448 | |||
2449 | // Could be first use | ||
2450 | LLFirstUse::useGoTo(); | ||
2451 | } | ||
2437 | return true; | 2452 | return true; |
2438 | } | 2453 | } |
2439 | 2454 | ||
@@ -5721,6 +5736,10 @@ class LLShowFloater : public view_listener_t | |||
5721 | { | 5736 | { |
5722 | LLFloaterActiveSpeakers::toggleInstance(LLSD()); | 5737 | LLFloaterActiveSpeakers::toggleInstance(LLSD()); |
5723 | } | 5738 | } |
5739 | else if (floater_name == "animation list") | ||
5740 | { | ||
5741 | JCFloaterAnimList::toggleInstance(LLSD()); | ||
5742 | } | ||
5724 | else if (floater_name == "inworld browser") | 5743 | else if (floater_name == "inworld browser") |
5725 | { | 5744 | { |
5726 | LLFloaterMediaBrowser::toggle(); | 5745 | LLFloaterMediaBrowser::toggle(); |
@@ -5927,7 +5946,6 @@ class LLLandEdit : public view_listener_t | |||
5927 | 5946 | ||
5928 | LLViewerParcelMgr::getInstance()->selectParcelAt( LLToolPie::getInstance()->getPick().mPosGlobal ); | 5947 | LLViewerParcelMgr::getInstance()->selectParcelAt( LLToolPie::getInstance()->getPick().mPosGlobal ); |
5929 | 5948 | ||
5930 | gFloaterTools->showMore(TRUE); | ||
5931 | gFloaterView->bringToFront( gFloaterTools ); | 5949 | gFloaterView->bringToFront( gFloaterTools ); |
5932 | 5950 | ||
5933 | // Switch to land edit toolset | 5951 | // Switch to land edit toolset |
@@ -8269,6 +8287,113 @@ class LLAdvancedCheckHUDInfo : public view_listener_t | |||
8269 | }; | 8287 | }; |
8270 | 8288 | ||
8271 | 8289 | ||
8290 | ////////////////////// | ||
8291 | // FORCE GROUND SIT // | ||
8292 | ////////////////////// | ||
8293 | |||
8294 | class LLAdvancedToggleSit: public view_listener_t | ||
8295 | { | ||
8296 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
8297 | { | ||
8298 | LLChat chat; | ||
8299 | chat.mSourceType = CHAT_SOURCE_SYSTEM; | ||
8300 | if(!gAgent.getAvatarObject()->mIsSitting) | ||
8301 | { | ||
8302 | gAgent.setControlFlags(AGENT_CONTROL_SIT_ON_GROUND); | ||
8303 | chat.mText = "Forcing Ground Sit"; | ||
8304 | } | ||
8305 | else | ||
8306 | { | ||
8307 | gAgent.setControlFlags(!AGENT_CONTROL_SIT_ON_GROUND); | ||
8308 | gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); | ||
8309 | chat.mText = "Standing up"; | ||
8310 | } | ||
8311 | LLFloaterChat::addChat(chat); | ||
8312 | return true; | ||
8313 | } | ||
8314 | }; | ||
8315 | |||
8316 | class LLAdvancedCheckSit : public view_listener_t | ||
8317 | { | ||
8318 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
8319 | { | ||
8320 | if(gAgent.getAvatarObject()->mIsSitting) | ||
8321 | { | ||
8322 | gMenuHolder->findControl(userdata["control"].asString())->setValue(true); | ||
8323 | } | ||
8324 | else | ||
8325 | { | ||
8326 | gMenuHolder->findControl(userdata["control"].asString())->setValue(false); | ||
8327 | } | ||
8328 | return true; | ||
8329 | } | ||
8330 | }; | ||
8331 | |||
8332 | |||
8333 | ///////////// | ||
8334 | // PHANTOM // | ||
8335 | ///////////// | ||
8336 | |||
8337 | class LLAdvancedTogglePhantom: public view_listener_t | ||
8338 | { | ||
8339 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
8340 | { | ||
8341 | LLAgent::togglePhantom(); | ||
8342 | BOOL ph = LLAgent::getPhantom(); | ||
8343 | LLChat chat; | ||
8344 | chat.mSourceType = CHAT_SOURCE_SYSTEM; | ||
8345 | chat.mText = llformat("%s%s","Phantom ",(ph ? "On" : "Off")); | ||
8346 | LLFloaterChat::addChat(chat); | ||
8347 | //gMenuHolder->findControl(userdata["control"].asString())->setValue(ph); | ||
8348 | return true; | ||
8349 | } | ||
8350 | |||
8351 | }; | ||
8352 | |||
8353 | class LLAdvancedCheckPhantom: public view_listener_t | ||
8354 | { | ||
8355 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
8356 | { | ||
8357 | gMenuHolder->findControl(userdata["control"].asString())->setValue(LLAgent::getPhantom()); | ||
8358 | return true; | ||
8359 | } | ||
8360 | }; | ||
8361 | |||
8362 | |||
8363 | /////////////////// | ||
8364 | // ASSET BROWSER // | ||
8365 | /////////////////// | ||
8366 | |||
8367 | class LLAdvancedToggleAssetBrowser: public view_listener_t | ||
8368 | { | ||
8369 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
8370 | { | ||
8371 | //open the floater | ||
8372 | LLFloaterAssetBrowser::show(0); | ||
8373 | |||
8374 | bool vis = false; | ||
8375 | if(LLFloaterAssetBrowser::getInstance()) | ||
8376 | { | ||
8377 | vis = (bool)LLFloaterAssetBrowser::getInstance()->getVisible(); | ||
8378 | } | ||
8379 | return true; | ||
8380 | } | ||
8381 | }; | ||
8382 | |||
8383 | class LLAdvancedCheckAssetBrowser: public view_listener_t | ||
8384 | { | ||
8385 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
8386 | { | ||
8387 | bool vis = false; | ||
8388 | if(LLFloaterAssetBrowser::getInstance()) | ||
8389 | { | ||
8390 | vis = (bool)LLFloaterAssetBrowser::getInstance()->getVisible(); | ||
8391 | } | ||
8392 | gMenuHolder->findControl(userdata["control"].asString())->setValue(vis); | ||
8393 | return true; | ||
8394 | } | ||
8395 | }; | ||
8396 | |||
8272 | 8397 | ||
8273 | /////////////////////// | 8398 | /////////////////////// |
8274 | // CLEAR GROUP CACHE // | 8399 | // CLEAR GROUP CACHE // |
@@ -10483,6 +10608,12 @@ void initialize_menus() | |||
10483 | addMenu(new LLAdvancedCheckConsole(), "Advanced.CheckConsole"); | 10608 | addMenu(new LLAdvancedCheckConsole(), "Advanced.CheckConsole"); |
10484 | addMenu(new LLAdvancedDumpInfoToConsole(), "Advanced.DumpInfoToConsole"); | 10609 | addMenu(new LLAdvancedDumpInfoToConsole(), "Advanced.DumpInfoToConsole"); |
10485 | addMenu(new LLAdvancedReloadSettingsOverrides(), "Advanced.ReloadSettingsOverrides"); | 10610 | addMenu(new LLAdvancedReloadSettingsOverrides(), "Advanced.ReloadSettingsOverrides"); |
10611 | addMenu(new LLAdvancedToggleSit(), "Advanced.ToggleSit"); | ||
10612 | addMenu(new LLAdvancedCheckSit(), "Emerald.CheckSit"); | ||
10613 | addMenu(new LLAdvancedTogglePhantom(), "Advanced.TogglePhantom"); | ||
10614 | addMenu(new LLAdvancedCheckPhantom(), "Advanced.CheckPhantom"); | ||
10615 | addMenu(new LLAdvancedToggleAssetBrowser(),"Advanced.ToggleAssetBrowser"); | ||
10616 | addMenu(new LLAdvancedCheckAssetBrowser(),"Advanced.CheckAssetBrowser"); | ||
10486 | 10617 | ||
10487 | // Advanced > HUD Info | 10618 | // Advanced > HUD Info |
10488 | addMenu(new LLAdvancedToggleHUDInfo(), "Advanced.ToggleHUDInfo"); | 10619 | addMenu(new LLAdvancedToggleHUDInfo(), "Advanced.ToggleHUDInfo"); |