From bc873f21dd6c414eba6e60e48d8985b39dd0980f Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Thu, 11 Jun 2009 01:29:16 -0700 Subject: Applied Armin's patch to create an Advanced Menu menu item (placed it in View and changed it to a check) --- linden/indra/newview/llviewermenu.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'linden/indra/newview/llviewermenu.cpp') diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index b255883..4dedf49 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -4542,6 +4542,25 @@ void print_agent_nvpairs(void*) llinfos << "Camera at " << gAgent.getCameraPositionGlobal() << llendl; } +class LLViewToggleAdvanced : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + toggle_debug_menus(NULL); + return true; + } +}; + +class LLViewCheckAdvanced : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + BOOL new_value = gSavedSettings.getBOOL("UseDebugMenus"); + gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); + return true; + } +}; + void show_debug_menus() { // this can get called at login screen where there is no menu so only toggle it if one exists @@ -9501,6 +9520,8 @@ void initialize_menus() addMenu(new LLViewZoomIn(), "View.ZoomIn"); addMenu(new LLViewZoomDefault(), "View.ZoomDefault"); addMenu(new LLViewFullscreen(), "View.Fullscreen"); + addMenu(new LLViewToggleAdvanced(), "View.ToggleAdvanced"); + addMenu(new LLViewEnableMouselook(), "View.EnableMouselook"); addMenu(new LLViewEnableLastChatter(), "View.EnableLastChatter"); @@ -9511,6 +9532,7 @@ void initialize_menus() addMenu(new LLViewCheckHighlightTransparent(), "View.CheckHighlightTransparent"); addMenu(new LLViewCheckRenderType(), "View.CheckRenderType"); addMenu(new LLViewCheckHUDAttachments(), "View.CheckHUDAttachments"); + addMenu(new LLViewCheckAdvanced(), "View.CheckAdvanced"); // World menu addMenu(new LLWorldChat(), "World.Chat"); -- cgit v1.1