summaryrefslogtreecommitdiff
path: root/indra/newview/llworldmapview.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/newview/llworldmapview.cpp
parenta67d2dd1a4c490eae337ae930eac98c714033711 (diff)
merge -r132032-132812 svn+ssh://svn.lindenlab.com/svn/linden/branches/gooey/gooey-1
Diffstat (limited to 'indra/newview/llworldmapview.cpp')
-rw-r--r--indra/newview/llworldmapview.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index 67bc205f62..4d7423eaae 100644
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -41,6 +41,7 @@
#include "lleventflags.h"
#include "llfloaterreg.h"
#include "llrender.h"
+#include "lltooltip.h"
#include "llagent.h"
#include "llcallingcard.h"
@@ -50,6 +51,7 @@
#include "llfloatermap.h"
#include "llfloaterworldmap.h"
#include "llfocusmgr.h"
+#include "lllocalcliprect.h"
#include "lltextbox.h"
#include "lltextureview.h"
#include "lltracker.h"
@@ -1179,10 +1181,12 @@ LLVector3d LLWorldMapView::viewPosToGlobal( S32 x, S32 y )
}
-BOOL LLWorldMapView::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* sticky_rect_screen )
+BOOL LLWorldMapView::handleToolTip( S32 x, S32 y, std::string& msg, LLRect& sticky_rect_screen )
{
LLVector3d pos_global = viewPosToGlobal(x, y);
+ std::string tooltip_msg;
+
LLSimInfo* info = LLWorldMap::getInstance()->simInfoFromPosGlobal(pos_global);
if (info)
{
@@ -1217,22 +1221,26 @@ BOOL LLWorldMapView::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* stic
}
}
}
- msg.assign( message );
+ tooltip_msg.assign( message );
// Optionally show region flags
std::string region_flags = LLViewerRegion::regionFlagsToString(info->mRegionFlags);
if (!region_flags.empty())
{
- msg += '\n';
- msg += region_flags;
+ tooltip_msg += '\n';
+ tooltip_msg += region_flags;
}
const S32 SLOP = 9;
S32 screen_x, screen_y;
localPointToScreen(x, y, &screen_x, &screen_y);
- sticky_rect_screen->setCenterAndSize(screen_x, screen_y, SLOP, SLOP);
+ sticky_rect_screen.setCenterAndSize(screen_x, screen_y, SLOP, SLOP);
+
+ LLToolTipMgr::instance().show(LLToolTipParams()
+ .message(tooltip_msg)
+ .sticky_rect(sticky_rect_screen));
}
return TRUE;
}
@@ -1744,7 +1752,7 @@ BOOL LLWorldMapView::handleMouseUp( S32 x, S32 y, MASK mask )
LLRect clip_rect = getRect();
clip_rect.stretch(-8);
clip_rect.clipPointToRect(mMouseDownX, mMouseDownY, local_x, local_y);
- LLUI::setCursorPositionLocal(this, local_x, local_y);
+ LLUI::setMousePositionLocal(this, local_x, local_y);
// finish the pan
mPanning = FALSE;