diff options
author | Jacek Antonelli | 2008-08-15 23:45:50 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:50 -0500 |
commit | 2a4dea528f670b9bb1f77ef27a8a1dd16603d114 (patch) | |
tree | 95c68e362703c9099d571ecbdc6142b1cda1e005 /linden/indra/newview/llviewermenu.cpp | |
parent | Second Life viewer sources 1.20.6 (diff) | |
download | meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.zip meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.gz meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.bz2 meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.xz |
Second Life viewer sources 1.20.7
Diffstat (limited to 'linden/indra/newview/llviewermenu.cpp')
-rw-r--r-- | linden/indra/newview/llviewermenu.cpp | 59 |
1 files changed, 44 insertions, 15 deletions
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 2459133..00226dd 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp | |||
@@ -401,8 +401,8 @@ void handle_duplicate_in_place(void*); | |||
401 | void handle_repeat_duplicate(void*); | 401 | void handle_repeat_duplicate(void*); |
402 | 402 | ||
403 | void handle_export(void*); | 403 | void handle_export(void*); |
404 | void handle_deed_object_to_group(void*); | 404 | // void handle_deed_object_to_group(void*); |
405 | BOOL enable_deed_object_to_group(void*); | 405 | // BOOL enable_deed_object_to_group(void*); |
406 | void handle_object_owner_self(void*); | 406 | void handle_object_owner_self(void*); |
407 | void handle_object_owner_permissive(void*); | 407 | void handle_object_owner_permissive(void*); |
408 | void handle_object_lock(void*); | 408 | void handle_object_lock(void*); |
@@ -515,7 +515,7 @@ public: | |||
515 | 515 | ||
516 | virtual void changed(U32 mask) | 516 | virtual void changed(U32 mask) |
517 | { | 517 | { |
518 | // JAMESDEBUG disabled for now - slows down client or causes crashes | 518 | // JC - Disabled for now - slows down client or causes crashes |
519 | // in inventory code. | 519 | // in inventory code. |
520 | // | 520 | // |
521 | // Also, this may not be faster than just rebuilding the menu each time. | 521 | // Also, this may not be faster than just rebuilding the menu each time. |
@@ -700,7 +700,7 @@ void init_menus() | |||
700 | gPopupMenuView->setBackgroundColor( color ); | 700 | gPopupMenuView->setBackgroundColor( color ); |
701 | 701 | ||
702 | // If we are not in production, use a different color to make it apparent. | 702 | // If we are not in production, use a different color to make it apparent. |
703 | if (LLAppViewer::instance()->isInProductionGrid()) | 703 | if (LLViewerLogin::getInstance()->isInProductionGrid()) |
704 | { | 704 | { |
705 | color = gColors.getColor( "MenuBarBgColor" ); | 705 | color = gColors.getColor( "MenuBarBgColor" ); |
706 | } | 706 | } |
@@ -722,7 +722,7 @@ void init_menus() | |||
722 | gViewerWindow->getRootView()->addChild(gMenuHolder); | 722 | gViewerWindow->getRootView()->addChild(gMenuHolder); |
723 | 723 | ||
724 | gViewerWindow->setMenuBackgroundColor(false, | 724 | gViewerWindow->setMenuBackgroundColor(false, |
725 | LLAppViewer::instance()->isInProductionGrid()); | 725 | LLViewerLogin::getInstance()->isInProductionGrid()); |
726 | 726 | ||
727 | // *TODO:Get the cost info from the server | 727 | // *TODO:Get the cost info from the server |
728 | const LLString upload_cost("10"); | 728 | const LLString upload_cost("10"); |
@@ -739,7 +739,7 @@ void init_menus() | |||
739 | // TomY TODO convert these two | 739 | // TomY TODO convert these two |
740 | LLMenuGL*menu; | 740 | LLMenuGL*menu; |
741 | 741 | ||
742 | // JAMESDEBUG - Maybe we don't want a global landmark menu | 742 | // JC - Maybe we don't want a global landmark menu |
743 | /* | 743 | /* |
744 | menu = new LLMenuGL(LANDMARK_MENU_NAME); | 744 | menu = new LLMenuGL(LANDMARK_MENU_NAME); |
745 | // Defer init_landmark_menu() until inventory observer reports that we actually | 745 | // Defer init_landmark_menu() until inventory observer reports that we actually |
@@ -969,7 +969,7 @@ void init_client_menu(LLMenuGL* menu) | |||
969 | 969 | ||
970 | 970 | ||
971 | #ifdef TOGGLE_HACKED_GODLIKE_VIEWER | 971 | #ifdef TOGGLE_HACKED_GODLIKE_VIEWER |
972 | if (!LLAppViewer::instance()->isInProductionGrid()) | 972 | if (!LLViewerLogin::getInstance()->isInProductionGrid()) |
973 | { | 973 | { |
974 | menu->append(new LLMenuItemCheckGL("Hacked Godmode", | 974 | menu->append(new LLMenuItemCheckGL("Hacked Godmode", |
975 | &handle_toggle_hacked_godmode, | 975 | &handle_toggle_hacked_godmode, |
@@ -1064,7 +1064,7 @@ void init_client_menu(LLMenuGL* menu) | |||
1064 | 1064 | ||
1065 | menu->appendSeparator(); | 1065 | menu->appendSeparator(); |
1066 | 1066 | ||
1067 | menu->append(new LLMenuItemCallGL("Compress Image...", | 1067 | menu->append(new LLMenuItemCallGL("Compress Images...", |
1068 | &handle_compress_image, NULL, NULL)); | 1068 | &handle_compress_image, NULL, NULL)); |
1069 | 1069 | ||
1070 | menu->append(new LLMenuItemCheckGL("Limit Select Distance", | 1070 | menu->append(new LLMenuItemCheckGL("Limit Select Distance", |
@@ -1096,7 +1096,9 @@ void init_client_menu(LLMenuGL* menu) | |||
1096 | { | 1096 | { |
1097 | LLMenuGL* sub = NULL; | 1097 | LLMenuGL* sub = NULL; |
1098 | sub = new LLMenuGL("Debugging"); | 1098 | sub = new LLMenuGL("Debugging"); |
1099 | #if LL_WINDOWS | ||
1099 | sub->append(new LLMenuItemCallGL("Force Breakpoint", &force_error_breakpoint, NULL, NULL, 'B', MASK_CONTROL | MASK_ALT)); | 1100 | sub->append(new LLMenuItemCallGL("Force Breakpoint", &force_error_breakpoint, NULL, NULL, 'B', MASK_CONTROL | MASK_ALT)); |
1101 | #endif | ||
1100 | sub->append(new LLMenuItemCallGL("Force LLError And Crash", &force_error_llerror)); | 1102 | sub->append(new LLMenuItemCallGL("Force LLError And Crash", &force_error_llerror)); |
1101 | sub->append(new LLMenuItemCallGL("Force Bad Memory Access", &force_error_bad_memory_access)); | 1103 | sub->append(new LLMenuItemCallGL("Force Bad Memory Access", &force_error_bad_memory_access)); |
1102 | sub->append(new LLMenuItemCallGL("Force Infinite Loop", &force_error_infinite_loop)); | 1104 | sub->append(new LLMenuItemCallGL("Force Infinite Loop", &force_error_infinite_loop)); |
@@ -1189,7 +1191,7 @@ void init_debug_ui_menu(LLMenuGL* menu) | |||
1189 | menu->append(new LLMenuItemCallGL( "Dump Focus Holder", &handle_dump_focus, NULL, NULL, 'F', MASK_ALT | MASK_CONTROL)); | 1191 | menu->append(new LLMenuItemCallGL( "Dump Focus Holder", &handle_dump_focus, NULL, NULL, 'F', MASK_ALT | MASK_CONTROL)); |
1190 | menu->append(new LLMenuItemCallGL( "Print Selected Object Info", &print_object_info, NULL, NULL, 'P', MASK_CONTROL|MASK_SHIFT )); | 1192 | menu->append(new LLMenuItemCallGL( "Print Selected Object Info", &print_object_info, NULL, NULL, 'P', MASK_CONTROL|MASK_SHIFT )); |
1191 | menu->append(new LLMenuItemCallGL( "Print Agent Info", &print_agent_nvpairs, NULL, NULL, 'P', MASK_SHIFT )); | 1193 | menu->append(new LLMenuItemCallGL( "Print Agent Info", &print_agent_nvpairs, NULL, NULL, 'P', MASK_SHIFT )); |
1192 | menu->append(new LLMenuItemCallGL( "Texture Memory Stats", &output_statistics, NULL, NULL, 'M', MASK_SHIFT | MASK_ALT | MASK_CONTROL)); | 1194 | menu->append(new LLMenuItemCallGL( "Memory Stats", &output_statistics, NULL, NULL, 'M', MASK_SHIFT | MASK_ALT | MASK_CONTROL)); |
1193 | menu->append(new LLMenuItemCheckGL("Double-Click Auto-Pilot", | 1195 | menu->append(new LLMenuItemCheckGL("Double-Click Auto-Pilot", |
1194 | menu_toggle_control, NULL, menu_check_control, | 1196 | menu_toggle_control, NULL, menu_check_control, |
1195 | (void*)"DoubleClickAutoPilot")); | 1197 | (void*)"DoubleClickAutoPilot")); |
@@ -1429,6 +1431,12 @@ void init_debug_rendering_menu(LLMenuGL* menu) | |||
1429 | item = new LLMenuItemCheckGL("Object-Object Occlusion", menu_toggle_control, NULL, menu_check_control, (void*)"UseOcclusion", 'O', MASK_CONTROL|MASK_SHIFT); | 1431 | item = new LLMenuItemCheckGL("Object-Object Occlusion", menu_toggle_control, NULL, menu_check_control, (void*)"UseOcclusion", 'O', MASK_CONTROL|MASK_SHIFT); |
1430 | item->setEnabled(gGLManager.mHasOcclusionQuery && LLFeatureManager::getInstance()->isFeatureAvailable("UseOcclusion")); | 1432 | item->setEnabled(gGLManager.mHasOcclusionQuery && LLFeatureManager::getInstance()->isFeatureAvailable("UseOcclusion")); |
1431 | menu->append(item); | 1433 | menu->append(item); |
1434 | |||
1435 | item = new LLMenuItemCheckGL("Debug GL", menu_toggle_control, NULL, menu_check_control, (void*)"RenderDebugGL"); | ||
1436 | menu->append(item); | ||
1437 | |||
1438 | item = new LLMenuItemCheckGL("Debug Pipeline", menu_toggle_control, NULL, menu_check_control, (void*)"RenderDebugPipeline"); | ||
1439 | menu->append(item); | ||
1432 | 1440 | ||
1433 | item = new LLMenuItemCheckGL("Fast Alpha", menu_toggle_control, NULL, menu_check_control, (void*)"RenderFastAlpha"); | 1441 | item = new LLMenuItemCheckGL("Fast Alpha", menu_toggle_control, NULL, menu_check_control, (void*)"RenderFastAlpha"); |
1434 | menu->append(item); | 1442 | menu->append(item); |
@@ -1490,6 +1498,7 @@ void init_debug_avatar_menu(LLMenuGL* menu) | |||
1490 | 1498 | ||
1491 | menu->appendMenu(sub_menu); | 1499 | menu->appendMenu(sub_menu); |
1492 | 1500 | ||
1501 | menu->append(new LLMenuItemCheckGL("Enable Lip Sync (Beta)", menu_toggle_control, NULL, menu_check_control, (void*)"LipSyncEnabled")); | ||
1493 | menu->append(new LLMenuItemToggleGL("Tap-Tap-Hold To Run", &gAllowTapTapHoldRun)); | 1502 | menu->append(new LLMenuItemToggleGL("Tap-Tap-Hold To Run", &gAllowTapTapHoldRun)); |
1494 | menu->append(new LLMenuItemCallGL("Force Params to Default", &LLAgent::clearVisualParams, NULL)); | 1503 | menu->append(new LLMenuItemCallGL("Force Params to Default", &LLAgent::clearVisualParams, NULL)); |
1495 | menu->append(new LLMenuItemCallGL("Reload Vertex Shader", &reload_vertex_shader, NULL)); | 1504 | menu->append(new LLMenuItemCallGL("Reload Vertex Shader", &reload_vertex_shader, NULL)); |
@@ -1501,7 +1510,8 @@ void init_debug_avatar_menu(LLMenuGL* menu) | |||
1501 | menu->append(new LLMenuItemToggleGL("Disable LOD", &LLViewerJoint::sDisableLOD)); | 1510 | menu->append(new LLMenuItemToggleGL("Disable LOD", &LLViewerJoint::sDisableLOD)); |
1502 | menu->append(new LLMenuItemToggleGL("Debug Character Vis", &LLVOAvatar::sDebugInvisible)); | 1511 | menu->append(new LLMenuItemToggleGL("Debug Character Vis", &LLVOAvatar::sDebugInvisible)); |
1503 | //menu->append(new LLMenuItemToggleGL("Show Attachment Points", &LLVOAvatar::sShowAttachmentPoints)); | 1512 | //menu->append(new LLMenuItemToggleGL("Show Attachment Points", &LLVOAvatar::sShowAttachmentPoints)); |
1504 | menu->append(new LLMenuItemToggleGL("Show Collision Plane", &LLVOAvatar::sShowFootPlane)); | 1513 | //diabling collision plane due to DEV-14477 -brad |
1514 | //menu->append(new LLMenuItemToggleGL("Show Collision Plane", &LLVOAvatar::sShowFootPlane)); | ||
1505 | menu->append(new LLMenuItemToggleGL("Show Collision Skeleton", &LLVOAvatar::sShowCollisionVolumes)); | 1515 | menu->append(new LLMenuItemToggleGL("Show Collision Skeleton", &LLVOAvatar::sShowCollisionVolumes)); |
1506 | menu->append(new LLMenuItemToggleGL( "Display Agent Target", &LLAgent::sDebugDisplayTarget)); | 1516 | menu->append(new LLMenuItemToggleGL( "Display Agent Target", &LLAgent::sDebugDisplayTarget)); |
1507 | menu->append(new LLMenuItemToggleGL( "Debug Rotation", &gDebugAvatarRotation)); | 1517 | menu->append(new LLMenuItemToggleGL( "Debug Rotation", &gDebugAvatarRotation)); |
@@ -2753,7 +2763,7 @@ void set_god_level(U8 god_level) | |||
2753 | if(gViewerWindow) | 2763 | if(gViewerWindow) |
2754 | { | 2764 | { |
2755 | gViewerWindow->setMenuBackgroundColor(god_level > GOD_NOT, | 2765 | gViewerWindow->setMenuBackgroundColor(god_level > GOD_NOT, |
2756 | LLAppViewer::instance()->isInProductionGrid()); | 2766 | LLViewerLogin::getInstance()->isInProductionGrid()); |
2757 | } | 2767 | } |
2758 | 2768 | ||
2759 | LLString::format_map_t args; | 2769 | LLString::format_map_t args; |
@@ -3163,6 +3173,21 @@ class LLWorldFly : public view_listener_t | |||
3163 | } | 3173 | } |
3164 | }; | 3174 | }; |
3165 | 3175 | ||
3176 | class LLWorldEnableFly : public view_listener_t | ||
3177 | { | ||
3178 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
3179 | { | ||
3180 | BOOL sitting = FALSE; | ||
3181 | if (gAgent.getAvatarObject()) | ||
3182 | { | ||
3183 | sitting = gAgent.getAvatarObject()->mIsSitting; | ||
3184 | } | ||
3185 | gMenuHolder->findControl(userdata["control"].asString())->setValue(!sitting); | ||
3186 | return true; | ||
3187 | } | ||
3188 | }; | ||
3189 | |||
3190 | |||
3166 | void handle_agent_stop_moving(void*) | 3191 | void handle_agent_stop_moving(void*) |
3167 | { | 3192 | { |
3168 | // stop agent | 3193 | // stop agent |
@@ -3476,6 +3501,7 @@ void handle_repeat_duplicate(void*) | |||
3476 | LLSelectMgr::getInstance()->repeatDuplicate(); | 3501 | LLSelectMgr::getInstance()->repeatDuplicate(); |
3477 | } | 3502 | } |
3478 | 3503 | ||
3504 | /* dead code 30-apr-2008 | ||
3479 | void handle_deed_object_to_group(void*) | 3505 | void handle_deed_object_to_group(void*) |
3480 | { | 3506 | { |
3481 | LLUUID group_id; | 3507 | LLUUID group_id; |
@@ -3501,6 +3527,8 @@ BOOL enable_deed_object_to_group(void*) | |||
3501 | return FALSE; | 3527 | return FALSE; |
3502 | } | 3528 | } |
3503 | 3529 | ||
3530 | */ | ||
3531 | |||
3504 | 3532 | ||
3505 | /* | 3533 | /* |
3506 | * No longer able to support viewer side manipulations in this way | 3534 | * No longer able to support viewer side manipulations in this way |
@@ -4072,7 +4100,7 @@ BOOL enable_take() | |||
4072 | return TRUE; | 4100 | return TRUE; |
4073 | #else | 4101 | #else |
4074 | # ifdef TOGGLE_HACKED_GODLIKE_VIEWER | 4102 | # ifdef TOGGLE_HACKED_GODLIKE_VIEWER |
4075 | if (!LLAppViewer::instance()->isInProductionGrid() | 4103 | if (!LLViewerLogin::getInstance()->isInProductionGrid() |
4076 | && gAgent.isGodlike()) | 4104 | && gAgent.isGodlike()) |
4077 | { | 4105 | { |
4078 | return TRUE; | 4106 | return TRUE; |
@@ -4629,7 +4657,7 @@ class LLObjectEnableDelete : public view_listener_t | |||
4629 | TRUE; | 4657 | TRUE; |
4630 | #else | 4658 | #else |
4631 | # ifdef TOGGLE_HACKED_GODLIKE_VIEWER | 4659 | # ifdef TOGGLE_HACKED_GODLIKE_VIEWER |
4632 | (!LLAppViewer::instance()->isInProductionGrid() | 4660 | (!LLViewerLogin::getInstance()->isInProductionGrid() |
4633 | && gAgent.isGodlike()) || | 4661 | && gAgent.isGodlike()) || |
4634 | # endif | 4662 | # endif |
4635 | LLSelectMgr::getInstance()->canDoDelete(); | 4663 | LLSelectMgr::getInstance()->canDoDelete(); |
@@ -6487,7 +6515,7 @@ class LLToolsEnableTakeCopy : public view_listener_t | |||
6487 | all_valid = true; | 6515 | all_valid = true; |
6488 | #ifndef HACKED_GODLIKE_VIEWER | 6516 | #ifndef HACKED_GODLIKE_VIEWER |
6489 | # ifdef TOGGLE_HACKED_GODLIKE_VIEWER | 6517 | # ifdef TOGGLE_HACKED_GODLIKE_VIEWER |
6490 | if (LLAppViewer::instance()->isInProductionGrid() | 6518 | if (LLViewerLogin::getInstance()->isInProductionGrid() |
6491 | || !gAgent.isGodlike()) | 6519 | || !gAgent.isGodlike()) |
6492 | # endif | 6520 | # endif |
6493 | { | 6521 | { |
@@ -6591,7 +6619,7 @@ BOOL enable_save_into_inventory(void*) | |||
6591 | return TRUE; | 6619 | return TRUE; |
6592 | #else | 6620 | #else |
6593 | # ifdef TOGGLE_HACKED_GODLIKE_VIEWER | 6621 | # ifdef TOGGLE_HACKED_GODLIKE_VIEWER |
6594 | if (!LLAppViewer::instance()->isInProductionGrid() | 6622 | if (!LLViewerLogin::getInstance()->isInProductionGrid() |
6595 | && gAgent.isGodlike()) | 6623 | && gAgent.isGodlike()) |
6596 | { | 6624 | { |
6597 | return TRUE; | 6625 | return TRUE; |
@@ -7766,6 +7794,7 @@ void initialize_menus() | |||
7766 | addMenu(new LLWorldChat(), "World.Chat"); | 7794 | addMenu(new LLWorldChat(), "World.Chat"); |
7767 | addMenu(new LLWorldAlwaysRun(), "World.AlwaysRun"); | 7795 | addMenu(new LLWorldAlwaysRun(), "World.AlwaysRun"); |
7768 | addMenu(new LLWorldFly(), "World.Fly"); | 7796 | addMenu(new LLWorldFly(), "World.Fly"); |
7797 | addMenu(new LLWorldEnableFly(), "World.EnableFly"); | ||
7769 | addMenu(new LLWorldCreateLandmark(), "World.CreateLandmark"); | 7798 | addMenu(new LLWorldCreateLandmark(), "World.CreateLandmark"); |
7770 | addMenu(new LLWorldSetHomeLocation(), "World.SetHomeLocation"); | 7799 | addMenu(new LLWorldSetHomeLocation(), "World.SetHomeLocation"); |
7771 | addMenu(new LLWorldTeleportHome(), "World.TeleportHome"); | 7800 | addMenu(new LLWorldTeleportHome(), "World.TeleportHome"); |