diff options
author | Jacek Antonelli | 2008-08-15 23:45:19 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:19 -0500 |
commit | b235c59d60472f818a9142c0886b95a0ff4191d7 (patch) | |
tree | d323c55587584b19cc43a03f58a178823f12d3cd /linden/indra/newview/llviewermenu.cpp | |
parent | Second Life viewer sources 1.18.5.3 (diff) | |
download | meta-impy-b235c59d60472f818a9142c0886b95a0ff4191d7.zip meta-impy-b235c59d60472f818a9142c0886b95a0ff4191d7.tar.gz meta-impy-b235c59d60472f818a9142c0886b95a0ff4191d7.tar.bz2 meta-impy-b235c59d60472f818a9142c0886b95a0ff4191d7.tar.xz |
Second Life viewer sources 1.18.6.0-RC
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llviewermenu.cpp | 99 |
1 files changed, 67 insertions, 32 deletions
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 8faa72c..a6fb7fa 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp | |||
@@ -191,7 +191,7 @@ | |||
191 | #include "llworldmap.h" | 191 | #include "llworldmap.h" |
192 | #include "object_flags.h" | 192 | #include "object_flags.h" |
193 | #include "pipeline.h" | 193 | #include "pipeline.h" |
194 | #include "viewer.h" | 194 | #include "llappviewer.h" |
195 | #include "roles_constants.h" | 195 | #include "roles_constants.h" |
196 | #include "llviewerjoystick.h" | 196 | #include "llviewerjoystick.h" |
197 | 197 | ||
@@ -218,8 +218,6 @@ LLVOAvatar* find_avatar_from_object( const LLUUID& object_id ); | |||
218 | 218 | ||
219 | void handle_test_load_url(void*); | 219 | void handle_test_load_url(void*); |
220 | 220 | ||
221 | extern void disconnect_viewer(void *); | ||
222 | |||
223 | // | 221 | // |
224 | // Evil hackish imported globals | 222 | // Evil hackish imported globals |
225 | // | 223 | // |
@@ -227,8 +225,6 @@ extern BOOL gRenderLightGlows; | |||
227 | extern BOOL gRenderAvatar; | 225 | extern BOOL gRenderAvatar; |
228 | extern BOOL gHideSelectedObjects; | 226 | extern BOOL gHideSelectedObjects; |
229 | extern BOOL gShowOverlayTitle; | 227 | extern BOOL gShowOverlayTitle; |
230 | extern BOOL gRandomizeFramerate; | ||
231 | extern BOOL gPeriodicSlowFrame; | ||
232 | extern BOOL gOcclusionCull; | 228 | extern BOOL gOcclusionCull; |
233 | extern BOOL gAllowSelectAvatar; | 229 | extern BOOL gAllowSelectAvatar; |
234 | 230 | ||
@@ -239,6 +235,7 @@ extern BOOL gAllowSelectAvatar; | |||
239 | LLMenuBarGL *gMenuBarView = NULL; | 235 | LLMenuBarGL *gMenuBarView = NULL; |
240 | LLViewerMenuHolderGL *gMenuHolder = NULL; | 236 | LLViewerMenuHolderGL *gMenuHolder = NULL; |
241 | LLMenuGL *gPopupMenuView = NULL; | 237 | LLMenuGL *gPopupMenuView = NULL; |
238 | LLMenuBarGL *gLoginMenuBarView = NULL; | ||
242 | 239 | ||
243 | // Pie menus | 240 | // Pie menus |
244 | LLPieMenu *gPieSelf = NULL; | 241 | LLPieMenu *gPieSelf = NULL; |
@@ -408,11 +405,16 @@ void handle_claim_public_land(void*); | |||
408 | void handle_god_request_havok(void *); | 405 | void handle_god_request_havok(void *); |
409 | void handle_god_request_avatar_geometry(void *); // Hack for easy testing of new avatar geometry | 406 | void handle_god_request_avatar_geometry(void *); // Hack for easy testing of new avatar geometry |
410 | void reload_personal_settings_overrides(void *); | 407 | void reload_personal_settings_overrides(void *); |
411 | void force_breakpoint(void *); | ||
412 | void reload_vertex_shader(void *); | 408 | void reload_vertex_shader(void *); |
413 | void slow_mo_animations(void *); | 409 | void slow_mo_animations(void *); |
414 | void handle_disconnect_viewer(void *); | 410 | void handle_disconnect_viewer(void *); |
415 | 411 | ||
412 | void force_error_breakpoint(void *); | ||
413 | void force_error_llerror(void *); | ||
414 | void force_error_bad_memory_access(void *); | ||
415 | void force_error_infinite_loop(void *); | ||
416 | void force_error_software_exception(void *); | ||
417 | |||
416 | void handle_stopall(void*); | 418 | void handle_stopall(void*); |
417 | //void handle_hinge(void*); | 419 | //void handle_hinge(void*); |
418 | //void handle_ptop(void*); | 420 | //void handle_ptop(void*); |
@@ -422,6 +424,7 @@ void handle_stopall(void*); | |||
422 | BOOL enable_dehinge(void*); | 424 | BOOL enable_dehinge(void*); |
423 | void handle_force_delete(void*); | 425 | void handle_force_delete(void*); |
424 | void print_object_info(void*); | 426 | void print_object_info(void*); |
427 | void print_agent_nvpairs(void*); | ||
425 | void show_debug_menus(); | 428 | void show_debug_menus(); |
426 | void toggle_debug_menus(void*); | 429 | void toggle_debug_menus(void*); |
427 | void toggle_map( void* user_data ); | 430 | void toggle_map( void* user_data ); |
@@ -446,7 +449,6 @@ void handle_force_unlock(void*); | |||
446 | void handle_selected_texture_info(void*); | 449 | void handle_selected_texture_info(void*); |
447 | void handle_dump_image_list(void*); | 450 | void handle_dump_image_list(void*); |
448 | 451 | ||
449 | void handle_fullscreen_debug(void*); | ||
450 | void handle_crash(void*); | 452 | void handle_crash(void*); |
451 | void handle_dump_followcam(void*); | 453 | void handle_dump_followcam(void*); |
452 | void handle_toggle_flycam(void*); | 454 | void handle_toggle_flycam(void*); |
@@ -749,6 +751,15 @@ void init_menus() | |||
749 | // Debug menu visiblity | 751 | // Debug menu visiblity |
750 | // | 752 | // |
751 | show_debug_menus(); | 753 | show_debug_menus(); |
754 | |||
755 | gLoginMenuBarView = (LLMenuBarGL*)gUICtrlFactory->buildMenu("menu_login.xml", gMenuHolder); | ||
756 | LLRect menuBarRect = gLoginMenuBarView->getRect(); | ||
757 | gLoginMenuBarView->setRect(LLRect(menuBarRect.mLeft, menuBarRect.mTop, gViewerWindow->getRootView()->getRect().getWidth() - menuBarRect.mLeft, menuBarRect.mBottom)); | ||
758 | |||
759 | gLoginMenuBarView->setBackgroundColor( color ); | ||
760 | |||
761 | gMenuHolder->addChild(gLoginMenuBarView); | ||
762 | |||
752 | } | 763 | } |
753 | 764 | ||
754 | void init_landmark_menu(LLMenuGL* menu) | 765 | void init_landmark_menu(LLMenuGL* menu) |
@@ -1061,16 +1072,18 @@ void init_client_menu(LLMenuGL* menu) | |||
1061 | &menu_check_control, | 1072 | &menu_check_control, |
1062 | (void*)"ShowConsoleWindow")); | 1073 | (void*)"ShowConsoleWindow")); |
1063 | 1074 | ||
1064 | #ifndef LL_RELEASE_FOR_DOWNLOAD | 1075 | if(gQAMode && !gInProductionGrid) |
1065 | { | 1076 | { |
1066 | LLMenuGL* sub = NULL; | 1077 | LLMenuGL* sub = NULL; |
1067 | sub = new LLMenuGL("Debugging"); | 1078 | sub = new LLMenuGL("Debugging"); |
1068 | sub->append(new LLMenuItemCallGL("Force Breakpoint", &force_breakpoint, NULL, NULL, 'B', MASK_CONTROL | MASK_ALT)); | 1079 | sub->append(new LLMenuItemCallGL("Force Breakpoint", &force_error_breakpoint, NULL, NULL, 'B', MASK_CONTROL | MASK_ALT)); |
1069 | sub->append(new LLMenuItemCallGL("LLError And Crash", &handle_crash)); | 1080 | sub->append(new LLMenuItemCallGL("Force LLError And Crash", &force_error_llerror)); |
1081 | sub->append(new LLMenuItemCallGL("Force Bad Memory Access", &force_error_bad_memory_access)); | ||
1082 | sub->append(new LLMenuItemCallGL("Force Infinite Loop", &force_error_infinite_loop)); | ||
1083 | // *NOTE:Mani this isn't handled yet... sub->append(new LLMenuItemCallGL("Force Software Exception", &force_error_unhandled_exception)); | ||
1070 | sub->createJumpKeys(); | 1084 | sub->createJumpKeys(); |
1071 | menu->appendMenu(sub); | 1085 | menu->appendMenu(sub); |
1072 | } | 1086 | } |
1073 | #endif | ||
1074 | 1087 | ||
1075 | // TomY Temporary menu item so we can test this floater | 1088 | // TomY Temporary menu item so we can test this floater |
1076 | menu->append(new LLMenuItemCheckGL("Clothing...", | 1089 | menu->append(new LLMenuItemCheckGL("Clothing...", |
@@ -2372,7 +2385,6 @@ void callback_leave_group(S32 option, void *userdata) | |||
2372 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | 2385 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); |
2373 | msg->nextBlockFast(_PREHASH_GroupData); | 2386 | msg->nextBlockFast(_PREHASH_GroupData); |
2374 | msg->addUUIDFast(_PREHASH_GroupID, gAgent.mGroupID ); | 2387 | msg->addUUIDFast(_PREHASH_GroupID, gAgent.mGroupID ); |
2375 | //msg->sendReliable( gUserServer ); | ||
2376 | gAgent.sendReliableMessage(); | 2388 | gAgent.sendReliableMessage(); |
2377 | } | 2389 | } |
2378 | } | 2390 | } |
@@ -4689,6 +4701,24 @@ void print_object_info(void*) | |||
4689 | gSelectMgr->selectionDump(); | 4701 | gSelectMgr->selectionDump(); |
4690 | } | 4702 | } |
4691 | 4703 | ||
4704 | void print_agent_nvpairs(void*) | ||
4705 | { | ||
4706 | LLViewerObject *objectp; | ||
4707 | |||
4708 | llinfos << "Agent Name Value Pairs" << llendl; | ||
4709 | |||
4710 | objectp = gObjectList.findObject(gAgentID); | ||
4711 | if (objectp) | ||
4712 | { | ||
4713 | objectp->printNameValuePairs(); | ||
4714 | } | ||
4715 | else | ||
4716 | { | ||
4717 | llinfos << "Can't find agent object" << llendl; | ||
4718 | } | ||
4719 | |||
4720 | llinfos << "Camera at " << gAgent.getCameraPositionGlobal() << llendl; | ||
4721 | } | ||
4692 | 4722 | ||
4693 | void show_debug_menus() | 4723 | void show_debug_menus() |
4694 | { | 4724 | { |
@@ -5174,18 +5204,6 @@ void handle_force_unlock(void*) | |||
5174 | gSelectMgr->getSelection()->applyToObjects(&func); | 5204 | gSelectMgr->getSelection()->applyToObjects(&func); |
5175 | } | 5205 | } |
5176 | 5206 | ||
5177 | // Fullscreen debug stuff | ||
5178 | void handle_fullscreen_debug(void*) | ||
5179 | { | ||
5180 | llinfos << "Width " << gViewerWindow->getWindowWidth() << " Height " << gViewerWindow->getWindowHeight() << llendl; | ||
5181 | llinfos << "mouse_x_from_center(100) " << mouse_x_from_center(100) << " y " << mouse_y_from_center(100) << llendl; | ||
5182 | } | ||
5183 | |||
5184 | void handle_crash(void*) | ||
5185 | { | ||
5186 | llerrs << "This is an llerror" << llendl; | ||
5187 | } | ||
5188 | |||
5189 | class LLWorldForceSun : public view_listener_t | 5207 | class LLWorldForceSun : public view_listener_t |
5190 | { | 5208 | { |
5191 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 5209 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
@@ -6811,13 +6829,6 @@ void reload_personal_settings_overrides(void *) | |||
6811 | gSavedSettings.loadFromFile(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT,"overrides.xml")); | 6829 | gSavedSettings.loadFromFile(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT,"overrides.xml")); |
6812 | } | 6830 | } |
6813 | 6831 | ||
6814 | void force_breakpoint(void *) | ||
6815 | { | ||
6816 | #if LL_WINDOWS // Forcing a breakpoint | ||
6817 | DebugBreak(); | ||
6818 | #endif | ||
6819 | } | ||
6820 | |||
6821 | void reload_vertex_shader(void *) | 6832 | void reload_vertex_shader(void *) |
6822 | { | 6833 | { |
6823 | //THIS WOULD BE AN AWESOME PLACE TO RELOAD SHADERS... just a thought - DaveP | 6834 | //THIS WOULD BE AN AWESOME PLACE TO RELOAD SHADERS... just a thought - DaveP |
@@ -6994,9 +7005,33 @@ void handle_disconnect_viewer(void *) | |||
6994 | 7005 | ||
6995 | snprintf(message, sizeof(message), "Testing viewer disconnect"); /* Flawfinder: ignore */ | 7006 | snprintf(message, sizeof(message), "Testing viewer disconnect"); /* Flawfinder: ignore */ |
6996 | 7007 | ||
6997 | do_disconnect(message); | 7008 | LLAppViewer::instance()->forceDisconnect(message); |
6998 | } | 7009 | } |
6999 | 7010 | ||
7011 | void force_error_breakpoint(void *) | ||
7012 | { | ||
7013 | LLAppViewer::instance()->forceErrorBreakpoint(); | ||
7014 | } | ||
7015 | |||
7016 | void force_error_llerror(void *) | ||
7017 | { | ||
7018 | LLAppViewer::instance()->forceErrorLLError(); | ||
7019 | } | ||
7020 | |||
7021 | void force_error_bad_memory_access(void *) | ||
7022 | { | ||
7023 | LLAppViewer::instance()->forceErrorBadMemoryAccess(); | ||
7024 | } | ||
7025 | |||
7026 | void force_error_infinite_loop(void *) | ||
7027 | { | ||
7028 | LLAppViewer::instance()->forceErrorInifiniteLoop(); | ||
7029 | } | ||
7030 | |||
7031 | void force_error_software_exception(void *) | ||
7032 | { | ||
7033 | LLAppViewer::instance()->forceErrorSoftwareException(); | ||
7034 | } | ||
7000 | 7035 | ||
7001 | class LLToolsUseSelectionForGrid : public view_listener_t | 7036 | class LLToolsUseSelectionForGrid : public view_listener_t |
7002 | { | 7037 | { |