diff options
| author | Bryan O'Sullivan <bos@lindenlab.com> | 2009-09-09 17:10:06 -0700 |
|---|---|---|
| committer | Bryan O'Sullivan <bos@lindenlab.com> | 2009-09-09 17:10:06 -0700 |
| commit | a997e131d4262f0a18a6f4f8c305c73edbfea6b6 (patch) | |
| tree | 5b7f8595e7911f4fd7ba6f2824c6b92f8478a9ef /indra/newview/llworldmapview.cpp | |
| parent | cab31b572d1a3b717b7f8b9fdf2a49f0b2eb6995 (diff) | |
| parent | bbf497469c4d71d5308421f1ef06d0a2098772c8 (diff) | |
Merge with SVN viewer-2.0.0-3 branch
Diffstat (limited to 'indra/newview/llworldmapview.cpp')
| -rw-r--r-- | indra/newview/llworldmapview.cpp | 20 |
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; |
