diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp index 549aa6bb4e..82ff89e442 100644 --- a/indra/llui/llconsole.cpp +++ b/indra/llui/llconsole.cpp @@ -175,6 +175,17 @@ void LLConsole::draw() return; } + // [FIRE-35039] Add flag to show/hide the on-screen console + // Get the Show On-screen Console flag from the Comm menu + static LLCachedControl showOnscreenConsole(*LLUI::getInstance()->mSettingGroups["config"], "FSShowOnscreenConsole"); + // If the Show On-screen Console flag is disabled and the current console is the global console + // (Not a debug console), then don't try to draw + if (!showOnscreenConsole && this == gConsole) + { + return; + } + // [FIRE-35039] + // Session support if (!mSessionSupport) { diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 73740b0c6d..7708f9a0c9 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -46,6 +46,8 @@ is_running_function="Floater.IsOpen" is_running_parameters="build" /> + + + Value 0 + + FSShowOnscreenConsole + + Comment + Displays the on-screen console + Persist + 1 + Type + Boolean + Value + 1 + + FSAdvancedWorldmapRegionInfo Comment diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 9d7bc8cba0..9bfcb73fe1 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7717,6 +7717,33 @@ class LLWorldSetDoNotDisturb : public view_listener_t } }; +// [FIRE-35039] Add flag to show/hide the on-screen console +// View Listener class to toggle the saved settings value FSShowOnscreenConsole +class LLCommSetShowOnscreenConsole : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + // Toggle the value to the opposite and just save the value back to the settings. + // This change will propagate to the other controls for this value + bool show_onscreen_console = !gSavedSettings.getBOOL("FSShowOnscreenConsole"); + gSavedSettings.setBOOL("FSShowOnscreenConsole", show_onscreen_console); + + return true; + } +}; + +// View Listener class to retrieve the saved settings value FSShowOnscreenConsole +class LLCommCheckShowOnscreenConsole : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + // Retrieve the Show On-screen Console flag and return it the the UI to update the state of the menu toggle. + bool show_onscreen_console = gSavedSettings.getBOOL("FSShowOnscreenConsole"); + return show_onscreen_console; + } +}; +// [FIRE-35039] + // [SJ - FIRE-2177 - Making Autorespons a simple Check in the menu again for clarity] class LLWorldGetBusy : public view_listener_t { @@ -12369,6 +12396,11 @@ void initialize_menus() // [FS communication UI] //enable.add("Conversation.IsConversationLoggingAllowed", boost::bind(&LLFloaterIMContainer::isConversationLoggingAllowed)); + // [FIRE-35039] Add flag to show/hide the on-screen console + // Add menu view listener to controll the FSShowOnscreenConsole value + view_listener_t::addMenu(new LLCommCheckShowOnscreenConsole(), "Comm.CheckShowOnscreenConsole"); // Add menu listener for "Show On-screen Console" check class + view_listener_t::addMenu(new LLCommSetShowOnscreenConsole(), "Comm.SetShowOnscreenConsole"); // Add menu listener for "Show On-screen Console" set class + // [FIRE-35039] enable.add("GridCheck", boost::bind(&checkIsGrid, _2)); // Opensim menu item visibility control enable.add("GridFeatureCheck", boost::bind(&isGridFeatureEnabled, _2)); diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 86bd19c9eb..02cf8b3e44 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -926,6 +926,17 @@ function="SideTray.PanelPeopleTab" parameter="blocked_panel" /> + + + + + + diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml index a6f6888f6b..078e26add0 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml @@ -88,6 +88,19 @@ width="60" /> + + + +