From 5157e74854f99fcd5ca59c073c55e9b9ca56d189 Mon Sep 17 00:00:00 2001 From: Arrehn Date: Sun, 10 Jun 2012 21:16:17 -0400 Subject: [PATCH] FIRE-6588, Cleanup for Develop Menu, ShowColor --- indra/newview/llviewermenu.cpp | 23 +++++++++++++++++++ .../skins/default/xui/en/menu_viewer.xml | 6 ++--- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 0cc500fb3c..5504693acc 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -1809,6 +1809,27 @@ class LLAdvancedToggleShowLookAt : public view_listener_t } }; +// +class LLAdvancedToggleShowColor : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + S32 value = !gSavedSettings.getS32("DebugShowColor"); + gSavedSettings.setS32("DebugShowColor",value); + return true; + } +}; + +class LLAdvancedCheckShowColor : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + S32 new_value = gSavedSettings.getS32("DebugShowColor"); + return (bool)new_value; + } +}; +// + class LLAdvancedCheckShowLookAt : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -9603,6 +9624,8 @@ void initialize_menus() view_listener_t::addMenu(new LLAdvancedToggleAnimationInfo(), "Advanced.ToggleAnimationInfo"); view_listener_t::addMenu(new LLAdvancedCheckAnimationInfo(), "Advanced.CheckAnimationInfo"); view_listener_t::addMenu(new LLAdvancedToggleShowLookAt(), "Advanced.ToggleShowLookAt"); + view_listener_t::addMenu(new LLAdvancedToggleShowColor(), "Advanced.ToggleShowColor"); + view_listener_t::addMenu(new LLAdvancedCheckShowColor(), "Advanced.CheckShowColor"); view_listener_t::addMenu(new LLAdvancedCheckShowLookAt(), "Advanced.CheckShowLookAt"); view_listener_t::addMenu(new LLAdvancedToggleShowPointAt(), "Advanced.ToggleShowPointAt"); view_listener_t::addMenu(new LLAdvancedCheckShowPointAt(), "Advanced.CheckShowPointAt"); diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 165f47ce9a..b30bd0cb13 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -2858,11 +2858,9 @@ label="Show Color Under Cursor" name="Show Color Under Cursor"> + function="Advanced.CheckShowColor" /> + function="Advanced.ToggleShowColor" />