diff options
Diffstat (limited to 'linden/indra/newview')
-rw-r--r-- | linden/indra/newview/llviewermenu.cpp | 22 | ||||
-rw-r--r-- | linden/indra/newview/llviewerwindow.cpp | 8 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml | 8 |
3 files changed, 29 insertions, 9 deletions
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*) | |||
4542 | llinfos << "Camera at " << gAgent.getCameraPositionGlobal() << llendl; | 4542 | llinfos << "Camera at " << gAgent.getCameraPositionGlobal() << llendl; |
4543 | } | 4543 | } |
4544 | 4544 | ||
4545 | class LLViewToggleAdvanced : public view_listener_t | ||
4546 | { | ||
4547 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
4548 | { | ||
4549 | toggle_debug_menus(NULL); | ||
4550 | return true; | ||
4551 | } | ||
4552 | }; | ||
4553 | |||
4554 | class LLViewCheckAdvanced : public view_listener_t | ||
4555 | { | ||
4556 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
4557 | { | ||
4558 | BOOL new_value = gSavedSettings.getBOOL("UseDebugMenus"); | ||
4559 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | ||
4560 | return true; | ||
4561 | } | ||
4562 | }; | ||
4563 | |||
4545 | void show_debug_menus() | 4564 | void show_debug_menus() |
4546 | { | 4565 | { |
4547 | // this can get called at login screen where there is no menu so only toggle it if one exists | 4566 | // 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() | |||
9501 | addMenu(new LLViewZoomIn(), "View.ZoomIn"); | 9520 | addMenu(new LLViewZoomIn(), "View.ZoomIn"); |
9502 | addMenu(new LLViewZoomDefault(), "View.ZoomDefault"); | 9521 | addMenu(new LLViewZoomDefault(), "View.ZoomDefault"); |
9503 | addMenu(new LLViewFullscreen(), "View.Fullscreen"); | 9522 | addMenu(new LLViewFullscreen(), "View.Fullscreen"); |
9523 | addMenu(new LLViewToggleAdvanced(), "View.ToggleAdvanced"); | ||
9524 | |||
9504 | 9525 | ||
9505 | addMenu(new LLViewEnableMouselook(), "View.EnableMouselook"); | 9526 | addMenu(new LLViewEnableMouselook(), "View.EnableMouselook"); |
9506 | addMenu(new LLViewEnableLastChatter(), "View.EnableLastChatter"); | 9527 | addMenu(new LLViewEnableLastChatter(), "View.EnableLastChatter"); |
@@ -9511,6 +9532,7 @@ void initialize_menus() | |||
9511 | addMenu(new LLViewCheckHighlightTransparent(), "View.CheckHighlightTransparent"); | 9532 | addMenu(new LLViewCheckHighlightTransparent(), "View.CheckHighlightTransparent"); |
9512 | addMenu(new LLViewCheckRenderType(), "View.CheckRenderType"); | 9533 | addMenu(new LLViewCheckRenderType(), "View.CheckRenderType"); |
9513 | addMenu(new LLViewCheckHUDAttachments(), "View.CheckHUDAttachments"); | 9534 | addMenu(new LLViewCheckHUDAttachments(), "View.CheckHUDAttachments"); |
9535 | addMenu(new LLViewCheckAdvanced(), "View.CheckAdvanced"); | ||
9514 | 9536 | ||
9515 | // World menu | 9537 | // World menu |
9516 | addMenu(new LLWorldChat(), "World.Chat"); | 9538 | addMenu(new LLWorldChat(), "World.Chat"); |
diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp index 9b2c566..7e6c24f 100644 --- a/linden/indra/newview/llviewerwindow.cpp +++ b/linden/indra/newview/llviewerwindow.cpp | |||
@@ -2357,14 +2357,6 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) | |||
2357 | } | 2357 | } |
2358 | 2358 | ||
2359 | // Explicit hack for debug menu. | 2359 | // Explicit hack for debug menu. |
2360 | if ((MASK_ALT & mask) && | ||
2361 | (MASK_CONTROL & mask) && | ||
2362 | ('D' == key || 'd' == key)) | ||
2363 | { | ||
2364 | toggle_debug_menus(NULL); | ||
2365 | } | ||
2366 | |||
2367 | // Explicit hack for debug menu. | ||
2368 | if ((mask == (MASK_SHIFT | MASK_CONTROL)) && | 2360 | if ((mask == (MASK_SHIFT | MASK_CONTROL)) && |
2369 | ('G' == key || 'g' == key)) | 2361 | ('G' == key || 'g' == key)) |
2370 | { | 2362 | { |
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml index 72b828d..d0f0bac 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml | |||
@@ -397,11 +397,17 @@ | |||
397 | <on_click function="View.ZoomOut" userdata="" /> | 397 | <on_click function="View.ZoomOut" userdata="" /> |
398 | </menu_item_call> | 398 | </menu_item_call> |
399 | </menu> | 399 | </menu> |
400 | <menu_item_separator /> | ||
401 | <menu_item_call name="Toggle Fullscreen" label="Toggle Fullscreen" | 400 | <menu_item_call name="Toggle Fullscreen" label="Toggle Fullscreen" |
402 | shortcut="alt|Enter"> | 401 | shortcut="alt|Enter"> |
403 | <on_click function="View.Fullscreen" userdata="" /> | 402 | <on_click function="View.Fullscreen" userdata="" /> |
404 | </menu_item_call> | 403 | </menu_item_call> |
404 | <menu_item_separator /> | ||
405 | <menu_item_check name="Toggle Advanced Menu" | ||
406 | label="Advanced Menu" | ||
407 | shortcut="control|alt|D"> | ||
408 | <on_click function="View.ToggleAdvanced" userdata="" /> | ||
409 | <on_check function="View.CheckAdvanced" /> | ||
410 | </menu_item_check> | ||
405 | </menu> | 411 | </menu> |
406 | 412 | ||
407 | 413 | ||