From b1b102cf662b9deb00c6231ca335fcf46b86034c Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 26 Jul 2019 21:10:01 +0300 Subject: SL-8380 Ability to disable 2D UI tooltips --- indra/llui/llview.cpp | 14 ++++++++++---- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llviewerwindow.cpp | 3 ++- 3 files changed, 23 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 89ad8138d8..0e81277185 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -875,10 +875,16 @@ BOOL LLView::handleToolTip(S32 x, S32 y, MASK mask) F32 timeout = LLToolTipMgr::instance().toolTipVisible() ? LLUI::sSettingGroups["config"]->getF32( "ToolTipFastDelay" ) : LLUI::sSettingGroups["config"]->getF32( "ToolTipDelay" ); - LLToolTipMgr::instance().show(LLToolTip::Params() - .message(tooltip) - .sticky_rect(calcScreenRect()) - .delay_time(timeout)); + + // Even if we don't show tooltips, consume the event, nothing below should show tooltip + bool allow_ui_tooltips = LLUI::sSettingGroups["config"]->getBOOL( "BasicUITooltips" ); + if (allow_ui_tooltips) + { + LLToolTipMgr::instance().show(LLToolTip::Params() + .message(tooltip) + .sticky_rect(calcScreenRect()) + .delay_time(timeout)); + } handled = TRUE; } diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 472a76a7e2..b4919c6e48 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -11219,6 +11219,17 @@ Value 1 + BasicUITooltips + + Comment + Show tooltips for various 2D UI elements like buttons or checkboxes, won't supress tooltips like drag'n'drop, inworld, links or media + Persist + 1 + Type + Boolean + Value + 1 + ShowHoverTips Comment diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 9afe85a6f5..7f3e1faa33 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3367,7 +3367,8 @@ void LLViewerWindow::updateUI() LLRect screen_sticky_rect = mRootView->getLocalRect(); S32 local_x, local_y; - if (gSavedSettings.getBOOL("DebugShowXUINames")) + static LLCachedControl debug_show_xui_names(gSavedSettings, "DebugShowXUINames", 0); + if (debug_show_xui_names) { LLToolTip::Params params; -- cgit v1.2.3