aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llviewermenu.cpp')
-rw-r--r--linden/indra/newview/llviewermenu.cpp99
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
219void handle_test_load_url(void*); 219void handle_test_load_url(void*);
220 220
221extern 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;
227extern BOOL gRenderAvatar; 225extern BOOL gRenderAvatar;
228extern BOOL gHideSelectedObjects; 226extern BOOL gHideSelectedObjects;
229extern BOOL gShowOverlayTitle; 227extern BOOL gShowOverlayTitle;
230extern BOOL gRandomizeFramerate;
231extern BOOL gPeriodicSlowFrame;
232extern BOOL gOcclusionCull; 228extern BOOL gOcclusionCull;
233extern BOOL gAllowSelectAvatar; 229extern BOOL gAllowSelectAvatar;
234 230
@@ -239,6 +235,7 @@ extern BOOL gAllowSelectAvatar;
239LLMenuBarGL *gMenuBarView = NULL; 235LLMenuBarGL *gMenuBarView = NULL;
240LLViewerMenuHolderGL *gMenuHolder = NULL; 236LLViewerMenuHolderGL *gMenuHolder = NULL;
241LLMenuGL *gPopupMenuView = NULL; 237LLMenuGL *gPopupMenuView = NULL;
238LLMenuBarGL *gLoginMenuBarView = NULL;
242 239
243// Pie menus 240// Pie menus
244LLPieMenu *gPieSelf = NULL; 241LLPieMenu *gPieSelf = NULL;
@@ -408,11 +405,16 @@ void handle_claim_public_land(void*);
408void handle_god_request_havok(void *); 405void handle_god_request_havok(void *);
409void handle_god_request_avatar_geometry(void *); // Hack for easy testing of new avatar geometry 406void handle_god_request_avatar_geometry(void *); // Hack for easy testing of new avatar geometry
410void reload_personal_settings_overrides(void *); 407void reload_personal_settings_overrides(void *);
411void force_breakpoint(void *);
412void reload_vertex_shader(void *); 408void reload_vertex_shader(void *);
413void slow_mo_animations(void *); 409void slow_mo_animations(void *);
414void handle_disconnect_viewer(void *); 410void handle_disconnect_viewer(void *);
415 411
412void force_error_breakpoint(void *);
413void force_error_llerror(void *);
414void force_error_bad_memory_access(void *);
415void force_error_infinite_loop(void *);
416void force_error_software_exception(void *);
417
416void handle_stopall(void*); 418void 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*);
422BOOL enable_dehinge(void*); 424BOOL enable_dehinge(void*);
423void handle_force_delete(void*); 425void handle_force_delete(void*);
424void print_object_info(void*); 426void print_object_info(void*);
427void print_agent_nvpairs(void*);
425void show_debug_menus(); 428void show_debug_menus();
426void toggle_debug_menus(void*); 429void toggle_debug_menus(void*);
427void toggle_map( void* user_data ); 430void toggle_map( void* user_data );
@@ -446,7 +449,6 @@ void handle_force_unlock(void*);
446void handle_selected_texture_info(void*); 449void handle_selected_texture_info(void*);
447void handle_dump_image_list(void*); 450void handle_dump_image_list(void*);
448 451
449void handle_fullscreen_debug(void*);
450void handle_crash(void*); 452void handle_crash(void*);
451void handle_dump_followcam(void*); 453void handle_dump_followcam(void*);
452void handle_toggle_flycam(void*); 454void 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
754void init_landmark_menu(LLMenuGL* menu) 765void 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
4704void 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
4693void show_debug_menus() 4723void 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
5178void 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
5184void handle_crash(void*)
5185{
5186 llerrs << "This is an llerror" << llendl;
5187}
5188
5189class LLWorldForceSun : public view_listener_t 5207class 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
6814void force_breakpoint(void *)
6815{
6816#if LL_WINDOWS // Forcing a breakpoint
6817 DebugBreak();
6818#endif
6819}
6820
6821void reload_vertex_shader(void *) 6832void 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
7011void force_error_breakpoint(void *)
7012{
7013 LLAppViewer::instance()->forceErrorBreakpoint();
7014}
7015
7016void force_error_llerror(void *)
7017{
7018 LLAppViewer::instance()->forceErrorLLError();
7019}
7020
7021void force_error_bad_memory_access(void *)
7022{
7023 LLAppViewer::instance()->forceErrorBadMemoryAccess();
7024}
7025
7026void force_error_infinite_loop(void *)
7027{
7028 LLAppViewer::instance()->forceErrorInifiniteLoop();
7029}
7030
7031void force_error_software_exception(void *)
7032{
7033 LLAppViewer::instance()->forceErrorSoftwareException();
7034}
7000 7035
7001class LLToolsUseSelectionForGrid : public view_listener_t 7036class LLToolsUseSelectionForGrid : public view_listener_t
7002{ 7037{