diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llviewermenu.cpp | 102 |
1 files changed, 45 insertions, 57 deletions
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 22985b0..9f20e8e 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp | |||
@@ -679,7 +679,7 @@ void init_menus() | |||
679 | gPopupMenuView->setBackgroundColor( color ); | 679 | gPopupMenuView->setBackgroundColor( color ); |
680 | 680 | ||
681 | // If we are not in production, use a different color to make it apparent. | 681 | // If we are not in production, use a different color to make it apparent. |
682 | if (gInProductionGrid) | 682 | if (LLAppViewer::instance()->isInProductionGrid()) |
683 | { | 683 | { |
684 | color = gColors.getColor( "MenuBarBgColor" ); | 684 | color = gColors.getColor( "MenuBarBgColor" ); |
685 | } | 685 | } |
@@ -696,6 +696,9 @@ void init_menus() | |||
696 | // menu holder appears on top of menu bar so you can see the menu title | 696 | // menu holder appears on top of menu bar so you can see the menu title |
697 | // flash when an item is triggered (the flash occurs in the holder) | 697 | // flash when an item is triggered (the flash occurs in the holder) |
698 | gViewerWindow->getRootView()->addChild(gMenuHolder); | 698 | gViewerWindow->getRootView()->addChild(gMenuHolder); |
699 | |||
700 | gViewerWindow->setMenuBackgroundColor(false, | ||
701 | LLAppViewer::instance()->isInProductionGrid()); | ||
699 | 702 | ||
700 | // *TODO:Get the cost info from the server | 703 | // *TODO:Get the cost info from the server |
701 | const LLString upload_cost("10"); | 704 | const LLString upload_cost("10"); |
@@ -946,7 +949,7 @@ void init_client_menu(LLMenuGL* menu) | |||
946 | 949 | ||
947 | 950 | ||
948 | #ifdef TOGGLE_HACKED_GODLIKE_VIEWER | 951 | #ifdef TOGGLE_HACKED_GODLIKE_VIEWER |
949 | if (!gInProductionGrid) | 952 | if (!LLAppViewer::instance()->isInProductionGrid()) |
950 | { | 953 | { |
951 | menu->append(new LLMenuItemCheckGL("Hacked Godmode", | 954 | menu->append(new LLMenuItemCheckGL("Hacked Godmode", |
952 | &handle_toggle_hacked_godmode, | 955 | &handle_toggle_hacked_godmode, |
@@ -1072,7 +1075,7 @@ void init_client_menu(LLMenuGL* menu) | |||
1072 | &menu_check_control, | 1075 | &menu_check_control, |
1073 | (void*)"ShowConsoleWindow")); | 1076 | (void*)"ShowConsoleWindow")); |
1074 | 1077 | ||
1075 | if(gQAMode)// && !gInProductionGrid) | 1078 | if(gQAMode) |
1076 | { | 1079 | { |
1077 | LLMenuGL* sub = NULL; | 1080 | LLMenuGL* sub = NULL; |
1078 | sub = new LLMenuGL("Debugging"); | 1081 | sub = new LLMenuGL("Debugging"); |
@@ -2639,53 +2642,40 @@ void handle_leave_god_mode(void*) | |||
2639 | 2642 | ||
2640 | void set_god_level(U8 god_level) | 2643 | void set_god_level(U8 god_level) |
2641 | { | 2644 | { |
2642 | U8 old_god_level = gAgent.getGodLevel(); | 2645 | U8 old_god_level = gAgent.getGodLevel(); |
2643 | gAgent.setGodLevel( god_level ); | 2646 | gAgent.setGodLevel( god_level ); |
2644 | show_debug_menus(); | 2647 | show_debug_menus(); |
2645 | gIMMgr->refresh(); | 2648 | gIMMgr->refresh(); |
2646 | gParcelMgr->notifyObservers(); | 2649 | gParcelMgr->notifyObservers(); |
2647 | 2650 | ||
2648 | // Some classifieds change visibility on god mode | 2651 | // Some classifieds change visibility on god mode |
2649 | LLFloaterDirectory::requestClassifieds(); | 2652 | LLFloaterDirectory::requestClassifieds(); |
2650 | 2653 | ||
2651 | // God mode changes sim visibility | 2654 | // God mode changes sim visibility |
2652 | gWorldMap->reset(); | 2655 | gWorldMap->reset(); |
2653 | gWorldMap->setCurrentLayer(0); | 2656 | gWorldMap->setCurrentLayer(0); |
2654 | 2657 | ||
2655 | // inventory in items may change in god mode | 2658 | // inventory in items may change in god mode |
2656 | gObjectList.dirtyAllObjectInventory(); | 2659 | gObjectList.dirtyAllObjectInventory(); |
2660 | |||
2661 | if(gViewerWindow) | ||
2662 | { | ||
2663 | gViewerWindow->setMenuBackgroundColor(god_level > GOD_NOT, | ||
2664 | LLAppViewer::instance()->isInProductionGrid()); | ||
2665 | } | ||
2666 | |||
2667 | LLString::format_map_t args; | ||
2668 | if(god_level > GOD_NOT) | ||
2669 | { | ||
2670 | args["[LEVEL]"] = llformat("%d",(S32)god_level); | ||
2671 | LLNotifyBox::showXml("EnteringGodMode", args); | ||
2672 | } | ||
2673 | else | ||
2674 | { | ||
2675 | args["[LEVEL]"] = llformat("%d",(S32)old_god_level); | ||
2676 | LLNotifyBox::showXml("LeavingGodMode", args); | ||
2677 | } | ||
2657 | 2678 | ||
2658 | LLString::format_map_t args; | ||
2659 | if(god_level > GOD_NOT) | ||
2660 | { | ||
2661 | args["[LEVEL]"] = llformat("%d",(S32)god_level); | ||
2662 | if (gInProductionGrid) | ||
2663 | { | ||
2664 | gMenuBarView->setBackgroundColor( gColors.getColor( "MenuBarGodBgColor" ) ); | ||
2665 | gStatusBar->setBackgroundColor( gColors.getColor( "MenuBarGodBgColor" ) ); | ||
2666 | } | ||
2667 | else | ||
2668 | { | ||
2669 | gMenuBarView->setBackgroundColor( gColors.getColor( "MenuNonProductionGodBgColor" ) ); | ||
2670 | gStatusBar->setBackgroundColor( gColors.getColor( "MenuNonProductionGodBgColor" ) ); | ||
2671 | } | ||
2672 | LLNotifyBox::showXml("EnteringGodMode", args); | ||
2673 | } | ||
2674 | else | ||
2675 | { | ||
2676 | args["[LEVEL]"] = llformat("%d",(S32)old_god_level); | ||
2677 | if (gInProductionGrid) | ||
2678 | { | ||
2679 | gMenuBarView->setBackgroundColor( gColors.getColor( "MenuBarBgColor" ) ); | ||
2680 | gStatusBar->setBackgroundColor( gColors.getColor( "MenuBarBgColor" ) ); | ||
2681 | } | ||
2682 | else | ||
2683 | { | ||
2684 | gMenuBarView->setBackgroundColor( gColors.getColor( "MenuNonProductionBgColor" ) ); | ||
2685 | gStatusBar->setBackgroundColor( gColors.getColor( "MenuNonProductionBgColor" ) ); | ||
2686 | } | ||
2687 | LLNotifyBox::showXml("LeavingGodMode", args); | ||
2688 | } | ||
2689 | } | 2679 | } |
2690 | 2680 | ||
2691 | #ifdef TOGGLE_HACKED_GODLIKE_VIEWER | 2681 | #ifdef TOGGLE_HACKED_GODLIKE_VIEWER |
@@ -3992,7 +3982,8 @@ BOOL enable_take() | |||
3992 | return TRUE; | 3982 | return TRUE; |
3993 | #else | 3983 | #else |
3994 | # ifdef TOGGLE_HACKED_GODLIKE_VIEWER | 3984 | # ifdef TOGGLE_HACKED_GODLIKE_VIEWER |
3995 | if (!gInProductionGrid && gAgent.isGodlike()) | 3985 | if (!LLAppViewer::instance()->isInProductionGrid() |
3986 | && gAgent.isGodlike()) | ||
3996 | { | 3987 | { |
3997 | return TRUE; | 3988 | return TRUE; |
3998 | } | 3989 | } |
@@ -4551,7 +4542,8 @@ class LLObjectEnableDelete : public view_listener_t | |||
4551 | TRUE; | 4542 | TRUE; |
4552 | #else | 4543 | #else |
4553 | # ifdef TOGGLE_HACKED_GODLIKE_VIEWER | 4544 | # ifdef TOGGLE_HACKED_GODLIKE_VIEWER |
4554 | (!gInProductionGrid && gAgent.isGodlike()) || | 4545 | (!LLAppViewer::instance()->isInProductionGrid() |
4546 | && gAgent.isGodlike()) || | ||
4555 | # endif | 4547 | # endif |
4556 | (gSelectMgr && gSelectMgr->canDoDelete()); | 4548 | (gSelectMgr && gSelectMgr->canDoDelete()); |
4557 | #endif | 4549 | #endif |
@@ -6251,13 +6243,7 @@ void handle_selected_texture_info(void*) | |||
6251 | S32 height = img->getHeight(); | 6243 | S32 height = img->getHeight(); |
6252 | S32 width = img->getWidth(); | 6244 | S32 width = img->getWidth(); |
6253 | S32 components = img->getComponents(); | 6245 | S32 components = img->getComponents(); |
6254 | std::string image_id_string; | 6246 | msg = llformat("%dx%d %s on face ", |
6255 | if (gAgent.isGodlike()) | ||
6256 | { | ||
6257 | image_id_string = image_id.asString() + " "; | ||
6258 | } | ||
6259 | msg = llformat("%s%dx%d %s on face ", | ||
6260 | image_id_string.c_str(), | ||
6261 | width, | 6247 | width, |
6262 | height, | 6248 | height, |
6263 | (components == 4 ? "alpha" : "opaque")); | 6249 | (components == 4 ? "alpha" : "opaque")); |
@@ -6441,7 +6427,8 @@ class LLToolsEnableTakeCopy : public view_listener_t | |||
6441 | all_valid = true; | 6427 | all_valid = true; |
6442 | #ifndef HACKED_GODLIKE_VIEWER | 6428 | #ifndef HACKED_GODLIKE_VIEWER |
6443 | # ifdef TOGGLE_HACKED_GODLIKE_VIEWER | 6429 | # ifdef TOGGLE_HACKED_GODLIKE_VIEWER |
6444 | if (gInProductionGrid || !gAgent.isGodlike()) | 6430 | if (LLAppViewer::instance()->isInProductionGrid() |
6431 | || !gAgent.isGodlike()) | ||
6445 | # endif | 6432 | # endif |
6446 | { | 6433 | { |
6447 | struct f : public LLSelectedObjectFunctor | 6434 | struct f : public LLSelectedObjectFunctor |
@@ -6546,7 +6533,8 @@ BOOL enable_save_into_inventory(void*) | |||
6546 | return TRUE; | 6533 | return TRUE; |
6547 | #else | 6534 | #else |
6548 | # ifdef TOGGLE_HACKED_GODLIKE_VIEWER | 6535 | # ifdef TOGGLE_HACKED_GODLIKE_VIEWER |
6549 | if (!gInProductionGrid && gAgent.isGodlike()) | 6536 | if (!LLAppViewer::instance()->isInProductionGrid() |
6537 | && gAgent.isGodlike()) | ||
6550 | { | 6538 | { |
6551 | return TRUE; | 6539 | return TRUE; |
6552 | } | 6540 | } |