diff options
| author | Loren Shih <seraph@lindenlab.com> | 2010-02-08 14:58:53 -0500 |
|---|---|---|
| committer | Loren Shih <seraph@lindenlab.com> | 2010-02-08 14:58:53 -0500 |
| commit | 399d70eede54dff2ba6d14b33f85fdad4d33a662 (patch) | |
| tree | ce922e0963b8d46c236c4320b574916507fa3b65 /indra/newview/llinspect.cpp | |
| parent | 7e1932878563e5847335d5dcb66c9b23232c372c (diff) | |
| parent | 19f4240f977fc26d97e686c4e3a1f13b063e191c (diff) | |
automated merge viewer2.0->viewer2.0
Diffstat (limited to 'indra/newview/llinspect.cpp')
| -rw-r--r-- | indra/newview/llinspect.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/newview/llinspect.cpp b/indra/newview/llinspect.cpp index c7b651f37c..81cfce53b1 100644 --- a/indra/newview/llinspect.cpp +++ b/indra/newview/llinspect.cpp @@ -32,6 +32,7 @@ #include "llinspect.h" +#include "lltooltip.h" #include "llcontrol.h" // LLCachedControl #include "llui.h" // LLUI::sSettingsGroups #include "llviewermenu.h" @@ -104,6 +105,26 @@ BOOL LLInspect::handleHover(S32 x, S32 y, MASK mask) return LLView::handleHover(x, y, mask); } +BOOL LLInspect::handleToolTip(S32 x, S32 y, MASK mask) +{ + BOOL handled = FALSE; + + + //delegate handling of tooltip to the hovered child + LLView* child_handler = childFromPoint(x,y); + if (child_handler && !child_handler->getToolTip().empty())// show tooltip if a view has non-empty tooltip message + { + //build LLInspector params to get correct tooltip setting, etc. background image + LLInspector::Params params; + params.fillFrom(LLUICtrlFactory::instance().getDefaultParams<LLInspector>()); + params.message = child_handler->getToolTip(); + //set up delay if there is no visible tooltip at this moment + params.delay_time = LLToolTipMgr::instance().toolTipVisible() ? 0.f : LLUI::sSettingGroups["config"]->getF32( "ToolTipDelay" ); + LLToolTipMgr::instance().show(params); + handled = TRUE; + } + return handled; +} // virtual void LLInspect::onMouseLeave(S32 x, S32 y, MASK mask) { |
