summaryrefslogtreecommitdiff
path: root/indra/llui/lltextbase.cpp
diff options
context:
space:
mode:
authorRichard Nelson <richard@lindenlab.com>2009-09-09 01:26:44 +0000
committerRichard Nelson <richard@lindenlab.com>2009-09-09 01:26:44 +0000
commit58bce2d205bee3f5adb33b15efe73098e77429eb (patch)
treed591209e661af81fce315ceadc1179d277c579d8 /indra/llui/lltextbase.cpp
parenta67d2dd1a4c490eae337ae930eac98c714033711 (diff)
merge -r132032-132812 svn+ssh://svn.lindenlab.com/svn/linden/branches/gooey/gooey-1
Diffstat (limited to 'indra/llui/lltextbase.cpp')
-rw-r--r--indra/llui/lltextbase.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 038ea2188f..cb60b4fe36 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -38,6 +38,7 @@
#include "llview.h"
#include "llwindow.h"
#include "llmenugl.h"
+#include "lltooltip.h"
#include "lluictrl.h"
#include "llurlaction.h"
#include "llurlregistry.h"
@@ -402,18 +403,23 @@ BOOL LLTextBase::handleRightMouseDownOverUrl(LLView *view, S32 x, S32 y)
return FALSE;
}
-BOOL LLTextBase::handleToolTipForUrl(LLView *view, S32 x, S32 y, std::string& msg, LLRect* sticky_rect_screen)
+BOOL LLTextBase::handleToolTipForUrl(LLView *view, S32 x, S32 y, std::string& msg, LLRect& sticky_rect_screen)
{
+ std::string tooltip_msg;
const LLTextSegment* cur_segment = getSegmentAtLocalPos( x, y );
- if (cur_segment && cur_segment->getToolTip( msg ) && view)
+ if (cur_segment && cur_segment->getToolTip( tooltip_msg ) && view)
{
// Use a slop area around the cursor
const S32 SLOP = 8;
// Convert rect local to screen coordinates
- view->localPointToScreen(x - SLOP, y - SLOP, &(sticky_rect_screen->mLeft),
- &(sticky_rect_screen->mBottom));
- sticky_rect_screen->mRight = sticky_rect_screen->mLeft + 2 * SLOP;
- sticky_rect_screen->mTop = sticky_rect_screen->mBottom + 2 * SLOP;
+ view->localPointToScreen(x - SLOP, y - SLOP, &(sticky_rect_screen.mLeft),
+ &(sticky_rect_screen.mBottom));
+ sticky_rect_screen.mRight = sticky_rect_screen.mLeft + 2 * SLOP;
+ sticky_rect_screen.mTop = sticky_rect_screen.mBottom + 2 * SLOP;
+
+ LLToolTipMgr::instance().show(LLToolTipParams()
+ .message(tooltip_msg)
+ .sticky_rect(sticky_rect_screen));
}
return TRUE;
}