aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:04 -0500
committerJacek Antonelli2008-08-15 23:45:04 -0500
commit117e22047c5752352342d64e3fb7ce00a4eb8113 (patch)
treee32de2cfba0dda8705ae528fcd1fbe23ba075685 /linden/indra/newview/llviewermenu.cpp
parentSecond Life viewer sources 1.18.0.6 (diff)
downloadmeta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.zip
meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.gz
meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.bz2
meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.xz
Second Life viewer sources 1.18.1.2
Diffstat (limited to 'linden/indra/newview/llviewermenu.cpp')
-rw-r--r--linden/indra/newview/llviewermenu.cpp168
1 files changed, 117 insertions, 51 deletions
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp
index 31d10df..4ac1da4 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -79,6 +79,8 @@
79#include "llfloater.h" 79#include "llfloater.h"
80#include "llfloaterabout.h" 80#include "llfloaterabout.h"
81#include "llfloaterbuycurrency.h" 81#include "llfloaterbuycurrency.h"
82#include "llfloateractivespeakers.h"
83#include "llfloateranimpreview.h"
82#include "llfloateravatarinfo.h" 84#include "llfloateravatarinfo.h"
83#include "llfloateravatartextures.h" 85#include "llfloateravatartextures.h"
84#include "llfloaterbuildoptions.h" 86#include "llfloaterbuildoptions.h"
@@ -91,6 +93,7 @@
91#include "llfloatercustomize.h" 93#include "llfloatercustomize.h"
92#include "llfloaterdirectory.h" 94#include "llfloaterdirectory.h"
93#include "llfloatereditui.h" 95#include "llfloatereditui.h"
96#include "llfloaterchatterbox.h"
94#include "llfloaterfriends.h" 97#include "llfloaterfriends.h"
95#include "llfloatergesture.h" 98#include "llfloatergesture.h"
96#include "llfloatergodtools.h" 99#include "llfloatergodtools.h"
@@ -735,7 +738,7 @@ void init_client_menu(LLMenuGL* menu)
735 738
736 // neither of these works particularly well at the moment 739 // neither of these works particularly well at the moment
737 /*menu->append(new LLMenuItemCallGL( "Reload UI XML", &reload_ui, 740 /*menu->append(new LLMenuItemCallGL( "Reload UI XML", &reload_ui,
738 NULL, NULL, 'R', MASK_ALT | MASK_CONTROL ) );*/ 741 NULL, NULL) );*/
739 /*menu->append(new LLMenuItemCallGL("Reload settings/colors", 742 /*menu->append(new LLMenuItemCallGL("Reload settings/colors",
740 &handle_reload_settings, NULL, NULL));*/ 743 &handle_reload_settings, NULL, NULL));*/
741 menu->append(new LLMenuItemCallGL("Reload personal setting overrides", 744 menu->append(new LLMenuItemCallGL("Reload personal setting overrides",
@@ -893,7 +896,7 @@ void init_client_menu(LLMenuGL* menu)
893 (void*)"LimitSelectDistance")); 896 (void*)"LimitSelectDistance"));
894 897
895 menu->append(new LLMenuItemToggleGL("Disable Camera Constraints", 898 menu->append(new LLMenuItemToggleGL("Disable Camera Constraints",
896 &LLViewerCamera::sDisableCameraConstraints)); 899 &LLViewerCamera::sDisableCameraConstraints, 'C', MASK_ALT | MASK_CONTROL ));
897 900
898 menu->append(new LLMenuItemCheckGL("Joystick Flycam", 901 menu->append(new LLMenuItemCheckGL("Joystick Flycam",
899 &handle_toggle_flycam,NULL,&check_flycam,NULL)); 902 &handle_toggle_flycam,NULL,&check_flycam,NULL));
@@ -980,6 +983,7 @@ extern BOOL gDebugClicks;
980extern BOOL gDebugWindowProc; 983extern BOOL gDebugWindowProc;
981extern BOOL gDebugTextEditorTips; 984extern BOOL gDebugTextEditorTips;
982extern BOOL gDebugSelectMgr; 985extern BOOL gDebugSelectMgr;
986extern BOOL gVectorizePerfTest;
983 987
984void init_debug_ui_menu(LLMenuGL* menu) 988void init_debug_ui_menu(LLMenuGL* menu)
985{ 989{
@@ -1094,39 +1098,39 @@ void init_debug_rendering_menu(LLMenuGL* menu)
1094 sub_menu->append(new LLMenuItemCheckGL("UI", 1098 sub_menu->append(new LLMenuItemCheckGL("UI",
1095 &LLPipeline::toggleRenderDebugFeature, NULL, 1099 &LLPipeline::toggleRenderDebugFeature, NULL,
1096 &LLPipeline::toggleRenderDebugFeatureControl, 1100 &LLPipeline::toggleRenderDebugFeatureControl,
1097 (void*)LLPipeline::RENDER_DEBUG_FEATURE_UI, '1', MASK_ALT|MASK_CONTROL)); 1101 (void*)LLPipeline::RENDER_DEBUG_FEATURE_UI, KEY_F1, MASK_ALT|MASK_CONTROL));
1098 sub_menu->append(new LLMenuItemCheckGL("Selected", 1102 sub_menu->append(new LLMenuItemCheckGL("Selected",
1099 &LLPipeline::toggleRenderDebugFeature, NULL, 1103 &LLPipeline::toggleRenderDebugFeature, NULL,
1100 &LLPipeline::toggleRenderDebugFeatureControl, 1104 &LLPipeline::toggleRenderDebugFeatureControl,
1101 (void*)LLPipeline::RENDER_DEBUG_FEATURE_SELECTED, '2', MASK_ALT|MASK_CONTROL)); 1105 (void*)LLPipeline::RENDER_DEBUG_FEATURE_SELECTED, KEY_F2, MASK_ALT|MASK_CONTROL));
1102 sub_menu->append(new LLMenuItemCheckGL("Highlighted", 1106 sub_menu->append(new LLMenuItemCheckGL("Highlighted",
1103 &LLPipeline::toggleRenderDebugFeature, NULL, 1107 &LLPipeline::toggleRenderDebugFeature, NULL,
1104 &LLPipeline::toggleRenderDebugFeatureControl, 1108 &LLPipeline::toggleRenderDebugFeatureControl,
1105 (void*)LLPipeline::RENDER_DEBUG_FEATURE_HIGHLIGHTED, '3', MASK_ALT|MASK_CONTROL)); 1109 (void*)LLPipeline::RENDER_DEBUG_FEATURE_HIGHLIGHTED, KEY_F3, MASK_ALT|MASK_CONTROL));
1106 sub_menu->append(new LLMenuItemCheckGL("Dynamic Textures", 1110 sub_menu->append(new LLMenuItemCheckGL("Dynamic Textures",
1107 &LLPipeline::toggleRenderDebugFeature, NULL, 1111 &LLPipeline::toggleRenderDebugFeature, NULL,
1108 &LLPipeline::toggleRenderDebugFeatureControl, 1112 &LLPipeline::toggleRenderDebugFeatureControl,
1109 (void*)LLPipeline::RENDER_DEBUG_FEATURE_DYNAMIC_TEXTURES, '4', MASK_ALT|MASK_CONTROL)); 1113 (void*)LLPipeline::RENDER_DEBUG_FEATURE_DYNAMIC_TEXTURES, KEY_F4, MASK_ALT|MASK_CONTROL));
1110 sub_menu->append(new LLMenuItemCheckGL( "Foot Shadows", 1114 sub_menu->append(new LLMenuItemCheckGL( "Foot Shadows",
1111 &LLPipeline::toggleRenderDebugFeature, NULL, 1115 &LLPipeline::toggleRenderDebugFeature, NULL,
1112 &LLPipeline::toggleRenderDebugFeatureControl, 1116 &LLPipeline::toggleRenderDebugFeatureControl,
1113 (void*)LLPipeline::RENDER_DEBUG_FEATURE_FOOT_SHADOWS, '5', MASK_ALT|MASK_CONTROL)); 1117 (void*)LLPipeline::RENDER_DEBUG_FEATURE_FOOT_SHADOWS, KEY_F5, MASK_ALT|MASK_CONTROL));
1114 sub_menu->append(new LLMenuItemCheckGL("Fog", 1118 sub_menu->append(new LLMenuItemCheckGL("Fog",
1115 &LLPipeline::toggleRenderDebugFeature, NULL, 1119 &LLPipeline::toggleRenderDebugFeature, NULL,
1116 &LLPipeline::toggleRenderDebugFeatureControl, 1120 &LLPipeline::toggleRenderDebugFeatureControl,
1117 (void*)LLPipeline::RENDER_DEBUG_FEATURE_FOG, '6', MASK_ALT|MASK_CONTROL)); 1121 (void*)LLPipeline::RENDER_DEBUG_FEATURE_FOG, KEY_F6, MASK_ALT|MASK_CONTROL));
1118 sub_menu->append(new LLMenuItemCheckGL("Palletized Textures", 1122 sub_menu->append(new LLMenuItemCheckGL("Palletized Textures",
1119 &LLPipeline::toggleRenderDebugFeature, NULL, 1123 &LLPipeline::toggleRenderDebugFeature, NULL,
1120 &LLPipeline::toggleRenderDebugFeatureControl, 1124 &LLPipeline::toggleRenderDebugFeatureControl,
1121 (void*)LLPipeline::RENDER_DEBUG_FEATURE_PALETTE, '7', MASK_ALT|MASK_CONTROL)); 1125 (void*)LLPipeline::RENDER_DEBUG_FEATURE_PALETTE, KEY_F7, MASK_ALT|MASK_CONTROL));
1122 sub_menu->append(new LLMenuItemCheckGL("Test FRInfo", 1126 sub_menu->append(new LLMenuItemCheckGL("Test FRInfo",
1123 &LLPipeline::toggleRenderDebugFeature, NULL, 1127 &LLPipeline::toggleRenderDebugFeature, NULL,
1124 &LLPipeline::toggleRenderDebugFeatureControl, 1128 &LLPipeline::toggleRenderDebugFeatureControl,
1125 (void*)LLPipeline::RENDER_DEBUG_FEATURE_FR_INFO, '8', MASK_ALT|MASK_CONTROL)); 1129 (void*)LLPipeline::RENDER_DEBUG_FEATURE_FR_INFO, KEY_F8, MASK_ALT|MASK_CONTROL));
1126 sub_menu->append(new LLMenuItemCheckGL( "Flexible Objects", 1130 sub_menu->append(new LLMenuItemCheckGL( "Flexible Objects",
1127 &LLPipeline::toggleRenderDebugFeature, NULL, 1131 &LLPipeline::toggleRenderDebugFeature, NULL,
1128 &LLPipeline::toggleRenderDebugFeatureControl, 1132 &LLPipeline::toggleRenderDebugFeatureControl,
1129 (void*)LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE, '9', MASK_ALT|MASK_CONTROL)); 1133 (void*)LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE, KEY_F9, MASK_ALT|MASK_CONTROL));
1130 sub_menu->createJumpKeys(); 1134 sub_menu->createJumpKeys();
1131 1135
1132 ///////////////////////////// 1136 /////////////////////////////
@@ -1189,6 +1193,8 @@ void init_debug_rendering_menu(LLMenuGL* menu)
1189 (void*)"ShowDepthBuffer")); 1193 (void*)"ShowDepthBuffer"));
1190 sub_menu->append(new LLMenuItemToggleGL("Show Select Buffer", &gDebugSelect)); 1194 sub_menu->append(new LLMenuItemToggleGL("Show Select Buffer", &gDebugSelect));
1191 1195
1196 sub_menu->append(new LLMenuItemToggleGL("Vectorize Perf Test", &gVectorizePerfTest));
1197
1192 sub_menu = new LLMenuGL("Render Tests"); 1198 sub_menu = new LLMenuGL("Render Tests");
1193 1199
1194 sub_menu->append(new LLMenuItemCheckGL("Camera Offset", 1200 sub_menu->append(new LLMenuItemCheckGL("Camera Offset",
@@ -1296,7 +1302,7 @@ void init_debug_avatar_menu(LLMenuGL* menu)
1296 menu->append(new LLMenuItemToggleGL( "Display Agent Target", &LLAgent::sDebugDisplayTarget)); 1302 menu->append(new LLMenuItemToggleGL( "Display Agent Target", &LLAgent::sDebugDisplayTarget));
1297 menu->append(new LLMenuItemToggleGL( "Debug Rotation", &gDebugAvatarRotation)); 1303 menu->append(new LLMenuItemToggleGL( "Debug Rotation", &gDebugAvatarRotation));
1298 menu->append(new LLMenuItemCallGL("Dump Attachments", handle_dump_attachments)); 1304 menu->append(new LLMenuItemCallGL("Dump Attachments", handle_dump_attachments));
1299 menu->append(new LLMenuItemCallGL("Rebake Textures", handle_rebake_textures)); 1305 menu->append(new LLMenuItemCallGL("Rebake Textures", handle_rebake_textures, NULL, NULL, 'R', MASK_ALT | MASK_CONTROL ));
1300#ifndef LL_RELEASE_FOR_DOWNLOAD 1306#ifndef LL_RELEASE_FOR_DOWNLOAD
1301 menu->append(new LLMenuItemCallGL("Debug Avatar Textures", handle_debug_avatar_textures, NULL, NULL, 'A', MASK_SHIFT|MASK_CONTROL|MASK_ALT)); 1307 menu->append(new LLMenuItemCallGL("Debug Avatar Textures", handle_debug_avatar_textures, NULL, NULL, 'A', MASK_SHIFT|MASK_CONTROL|MASK_ALT));
1302 menu->append(new LLMenuItemCallGL("Dump Local Textures", handle_dump_avatar_local_textures, NULL, NULL, 'M', MASK_SHIFT|MASK_ALT )); 1308 menu->append(new LLMenuItemCallGL("Dump Local Textures", handle_dump_avatar_local_textures, NULL, NULL, 'M', MASK_SHIFT|MASK_ALT ));
@@ -2339,10 +2345,11 @@ void handle_buy_object(LLSaleInfo sale_info)
2339 return; 2345 return;
2340 } 2346 }
2341 2347
2342 if(sale_info.getSalePrice() > gStatusBar->getBalance()) 2348 S32 price = sale_info.getSalePrice();
2349
2350 if (price > 0 && price > gStatusBar->getBalance())
2343 { 2351 {
2344 LLFloaterBuyCurrency::buyCurrency( 2352 LLFloaterBuyCurrency::buyCurrency("This object costs", price);
2345 "This object costs", sale_info.getSalePrice());
2346 return; 2353 return;
2347 } 2354 }
2348 2355
@@ -2470,7 +2477,7 @@ void set_god_level(U8 god_level)
2470 U8 old_god_level = gAgent.getGodLevel(); 2477 U8 old_god_level = gAgent.getGodLevel();
2471 gAgent.setGodLevel( god_level ); 2478 gAgent.setGodLevel( god_level );
2472 show_debug_menus(); 2479 show_debug_menus();
2473 gIMView->refresh(); 2480 gIMMgr->refresh();
2474 gParcelMgr->notifyObservers(); 2481 gParcelMgr->notifyObservers();
2475 2482
2476 // Some classifieds change visibility on god mode 2483 // Some classifieds change visibility on god mode
@@ -2554,7 +2561,7 @@ void load_url_local_file(const char* file_name)
2554 gAgent.changeCameraToDefault(); 2561 gAgent.changeCameraToDefault();
2555 } 2562 }
2556 2563
2557#if LL_DARWIN || LL_LINUX 2564#if LL_DARWIN || LL_LINUX || LL_SOLARIS
2558 // MBW -- If the Mac client is in fullscreen mode, it needs to go windowed so the browser will be visible. 2565 // MBW -- If the Mac client is in fullscreen mode, it needs to go windowed so the browser will be visible.
2559 if(gViewerWindow->mWindow->getFullscreen()) 2566 if(gViewerWindow->mWindow->getFullscreen())
2560 { 2567 {
@@ -2673,7 +2680,7 @@ void request_friendship(const LLUUID& dest_id)
2673 } 2680 }
2674 if (!fullname.empty()) 2681 if (!fullname.empty())
2675 { 2682 {
2676 LLFloaterFriends::requestFriendship(dest_id, fullname); 2683 LLPanelFriends::requestFriendship(dest_id, fullname);
2677 LLNotifyBox::showXml("OfferedFriendship", args); 2684 LLNotifyBox::showXml("OfferedFriendship", args);
2678 } 2685 }
2679 else 2686 else
@@ -5371,7 +5378,7 @@ class LLShowFloater : public view_listener_t
5371 } 5378 }
5372 else if (floater_name == "friends") 5379 else if (floater_name == "friends")
5373 { 5380 {
5374 LLFloaterFriends::toggle(NULL); 5381 LLFloaterMyFriends::toggleInstance(0);
5375 } 5382 }
5376 else if (floater_name == "preferences") 5383 else if (floater_name == "preferences")
5377 { 5384 {
@@ -5383,11 +5390,11 @@ class LLShowFloater : public view_listener_t
5383 } 5390 }
5384 else if (floater_name == "chat history") 5391 else if (floater_name == "chat history")
5385 { 5392 {
5386 LLFloaterChat::toggle(NULL); 5393 LLFloaterChat::toggleInstance(LLSD());
5387 } 5394 }
5388 else if (floater_name == "im") 5395 else if (floater_name == "im")
5389 { 5396 {
5390 LLToolBar::onClickIM(NULL); 5397 LLFloaterChatterBox::toggleInstance(LLSD());
5391 } 5398 }
5392 else if (floater_name == "inventory") 5399 else if (floater_name == "inventory")
5393 { 5400 {
@@ -5496,6 +5503,10 @@ class LLShowFloater : public view_listener_t
5496 { 5503 {
5497 LLFloaterAbout::show(NULL); 5504 LLFloaterAbout::show(NULL);
5498 } 5505 }
5506 else if (floater_name == "active speakers")
5507 {
5508 LLFloaterActiveSpeakers::toggleInstance(LLSD());
5509 }
5499 return true; 5510 return true;
5500 } 5511 }
5501}; 5512};
@@ -5509,7 +5520,7 @@ class LLFloaterVisible : public view_listener_t
5509 bool new_value = false; 5520 bool new_value = false;
5510 if (floater_name == "friends") 5521 if (floater_name == "friends")
5511 { 5522 {
5512 new_value = LLFloaterFriends::visible(NULL); 5523 new_value = LLFloaterMyFriends::instanceVisible(0);
5513 } 5524 }
5514 else if (floater_name == "toolbar") 5525 else if (floater_name == "toolbar")
5515 { 5526 {
@@ -5521,7 +5532,7 @@ class LLFloaterVisible : public view_listener_t
5521 } 5532 }
5522 else if (floater_name == "im") 5533 else if (floater_name == "im")
5523 { 5534 {
5524 new_value = gIMView && gIMView->mTalkFloater && gIMView->mTalkFloater->getVisible(); 5535 new_value = LLFloaterMyFriends::instanceVisible(0);
5525 } 5536 }
5526 else if (floater_name == "mute list") 5537 else if (floater_name == "mute list")
5527 { 5538 {
@@ -5539,6 +5550,10 @@ class LLFloaterVisible : public view_listener_t
5539 { 5550 {
5540 new_value = gDebugView->mStatViewp->getVisible(); 5551 new_value = gDebugView->mStatViewp->getVisible();
5541 } 5552 }
5553 else if (floater_name == "active speakers")
5554 {
5555 new_value = LLFloaterActiveSpeakers::instanceVisible(LLSD());
5556 }
5542 gMenuHolder->findControl(control_name)->setValue(new_value); 5557 gMenuHolder->findControl(control_name)->setValue(new_value);
5543 return true; 5558 return true;
5544 } 5559 }
@@ -5655,19 +5670,7 @@ class LLShowAgentGroups : public view_listener_t
5655{ 5670{
5656 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 5671 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
5657 { 5672 {
5658 LLUUID agent_id; 5673 LLFloaterMyFriends::toggleInstance(1);
5659 if (userdata.asString() == "agent")
5660 {
5661 agent_id = gAgent.getID();
5662 }
5663 else
5664 {
5665 agent_id = userdata.asUUID();
5666 }
5667 if(agent_id.notNull())
5668 {
5669 LLFloaterGroups::show(agent_id, LLFloaterGroups::AGENT_GROUPS);
5670 }
5671 return true; 5674 return true;
5672 } 5675 }
5673}; 5676};
@@ -6167,10 +6170,10 @@ class LLAvatarSendIM : public view_listener_t
6167 name.append( last->getString() ); 6170 name.append( last->getString() );
6168 } 6171 }
6169 6172
6170 gIMView->setFloaterOpen(TRUE); 6173 gIMMgr->setFloaterOpen(TRUE);
6171 //EInstantMessage type = have_agent_callingcard(gLastHitObjectID) 6174 //EInstantMessage type = have_agent_callingcard(gLastHitObjectID)
6172 // ? IM_SESSION_ADD : IM_SESSION_CARDLESS_START; 6175 // ? IM_SESSION_ADD : IM_SESSION_CARDLESS_START;
6173 gIMView->addSession(name, 6176 gIMMgr->addSession(name,
6174 IM_NOTHING_SPECIAL, 6177 IM_NOTHING_SPECIAL,
6175 avatar->getID()); 6178 avatar->getID());
6176 } 6179 }
@@ -7316,22 +7319,66 @@ class LLViewToggleBeacon : public view_listener_t
7316 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 7319 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
7317 { 7320 {
7318 LLString beacon = userdata.asString(); 7321 LLString beacon = userdata.asString();
7319 if (beacon == "scripts") 7322 if (beacon == "scriptsbeacon")
7320 { 7323 {
7321 LLPipeline::toggleRenderScriptedBeacons(NULL); 7324 LLPipeline::toggleRenderScriptedBeacons(NULL);
7325 gSavedSettings.setBOOL( "scriptsbeacon", LLPipeline::getRenderScriptedBeacons(NULL) );
7326 // toggle the other one off if it's on
7327 if (LLPipeline::getRenderScriptedBeacons(NULL) && LLPipeline::getRenderScriptedTouchBeacons(NULL))
7328 {
7329 LLPipeline::toggleRenderScriptedTouchBeacons(NULL);
7330 gSavedSettings.setBOOL( "scripttouchbeacon", LLPipeline::getRenderScriptedTouchBeacons(NULL) );
7331 }
7322 } 7332 }
7323 else if (beacon == "physical") 7333 else if (beacon == "physicalbeacon")
7324 { 7334 {
7325 LLPipeline::toggleRenderPhysicalBeacons(NULL); 7335 LLPipeline::toggleRenderPhysicalBeacons(NULL);
7336 gSavedSettings.setBOOL( "physicalbeacon", LLPipeline::getRenderPhysicalBeacons(NULL) );
7326 } 7337 }
7327 else if (beacon == "sounds") 7338 else if (beacon == "soundsbeacon")
7328 { 7339 {
7329 LLPipeline::toggleRenderSoundBeacons(NULL); 7340 LLPipeline::toggleRenderSoundBeacons(NULL);
7341 gSavedSettings.setBOOL( "soundsbeacon", LLPipeline::getRenderSoundBeacons(NULL) );
7330 } 7342 }
7331 else if (beacon == "particles") 7343 else if (beacon == "particlesbeacon")
7332 { 7344 {
7333 LLPipeline::toggleRenderParticleBeacons(NULL); 7345 LLPipeline::toggleRenderParticleBeacons(NULL);
7346 gSavedSettings.setBOOL( "particlesbeacon", LLPipeline::getRenderParticleBeacons(NULL) );
7334 } 7347 }
7348 else if (beacon == "scripttouchbeacon")
7349 {
7350 LLPipeline::toggleRenderScriptedTouchBeacons(NULL);
7351 gSavedSettings.setBOOL( "scripttouchbeacon", LLPipeline::getRenderScriptedTouchBeacons(NULL) );
7352 // toggle the other one off if it's on
7353 if (LLPipeline::getRenderScriptedBeacons(NULL) && LLPipeline::getRenderScriptedTouchBeacons(NULL))
7354 {
7355 LLPipeline::toggleRenderScriptedBeacons(NULL);
7356 gSavedSettings.setBOOL( "scriptsbeacon", LLPipeline::getRenderScriptedBeacons(NULL) );
7357 }
7358 }
7359 else if (beacon == "renderbeacons")
7360 {
7361 LLPipeline::toggleRenderBeacons(NULL);
7362 gSavedSettings.setBOOL( "renderbeacons", LLPipeline::getRenderBeacons(NULL) );
7363 // toggle the other one on if it's not
7364 if (!LLPipeline::getRenderBeacons(NULL) && !LLPipeline::getRenderHighlights(NULL))
7365 {
7366 LLPipeline::toggleRenderHighlights(NULL);
7367 gSavedSettings.setBOOL( "renderhighlights", LLPipeline::getRenderHighlights(NULL) );
7368 }
7369 }
7370 else if (beacon == "renderhighlights")
7371 {
7372 LLPipeline::toggleRenderHighlights(NULL);
7373 gSavedSettings.setBOOL( "renderhighlights", LLPipeline::getRenderHighlights(NULL) );
7374 // toggle the other one on if it's not
7375 if (!LLPipeline::getRenderBeacons(NULL) && !LLPipeline::getRenderHighlights(NULL))
7376 {
7377 LLPipeline::toggleRenderBeacons(NULL);
7378 gSavedSettings.setBOOL( "renderbeacons", LLPipeline::getRenderBeacons(NULL) );
7379 }
7380 }
7381
7335 return true; 7382 return true;
7336 } 7383 }
7337}; 7384};
@@ -7342,21 +7389,40 @@ class LLViewCheckBeaconEnabled : public view_listener_t
7342 { 7389 {
7343 LLString beacon = userdata["data"].asString(); 7390 LLString beacon = userdata["data"].asString();
7344 bool new_value = false; 7391 bool new_value = false;
7345 if (beacon == "scripts") 7392 if (beacon == "scriptsbeacon")
7393 {
7394 new_value = gSavedSettings.getBOOL( "scriptsbeacon");
7395 LLPipeline::setRenderScriptedBeacons(new_value);
7396 }
7397 else if (beacon == "physicalbeacon")
7398 {
7399 new_value = gSavedSettings.getBOOL( "physicalbeacon");
7400 LLPipeline::setRenderPhysicalBeacons(new_value);
7401 }
7402 else if (beacon == "soundsbeacon")
7403 {
7404 new_value = gSavedSettings.getBOOL( "soundsbeacon");
7405 LLPipeline::setRenderSoundBeacons(new_value);
7406 }
7407 else if (beacon == "particlesbeacon")
7346 { 7408 {
7347 new_value = LLPipeline::getRenderScriptedBeacons(NULL); 7409 new_value = gSavedSettings.getBOOL( "particlesbeacon");
7410 LLPipeline::setRenderParticleBeacons(new_value);
7348 } 7411 }
7349 else if (beacon == "physical") 7412 else if (beacon == "scripttouchbeacon")
7350 { 7413 {
7351 new_value = LLPipeline::getRenderPhysicalBeacons(NULL); 7414 new_value = gSavedSettings.getBOOL( "scripttouchbeacon");
7415 LLPipeline::setRenderScriptedTouchBeacons(new_value);
7352 } 7416 }
7353 else if (beacon == "sounds") 7417 else if (beacon == "renderbeacons")
7354 { 7418 {
7355 new_value = LLPipeline::getRenderSoundBeacons(NULL); 7419 new_value = gSavedSettings.getBOOL( "renderbeacons");
7420 LLPipeline::setRenderBeacons(new_value);
7356 } 7421 }
7357 else if (beacon == "particles") 7422 else if (beacon == "renderhighlights")
7358 { 7423 {
7359 new_value = LLPipeline::getRenderParticleBeacons(NULL); 7424 new_value = gSavedSettings.getBOOL( "renderhighlights");
7425 LLPipeline::setRenderHighlights(new_value);
7360 } 7426 }
7361 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); 7427 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
7362 return true; 7428 return true;
@@ -7384,7 +7450,7 @@ class LLViewCheckRenderType : public view_listener_t
7384 bool new_value = false; 7450 bool new_value = false;
7385 if (type == "particles") 7451 if (type == "particles")
7386 { 7452 {
7387 new_value = LLPipeline::toggleRenderTypeControlNegated((void *)(S32)LLPipeline::RENDER_TYPE_PARTICLES); 7453 new_value = LLPipeline::toggleRenderTypeControlNegated((void *)LLPipeline::RENDER_TYPE_PARTICLES);
7388 } 7454 }
7389 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); 7455 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
7390 return true; 7456 return true;