diff options
author | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-18 10:04:08 +0200 |
---|---|---|
committer | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-18 10:04:08 +0200 |
commit | da2a0cfceb9fbc7c66f23f8820309f36b6629530 (patch) | |
tree | 1a2c93b5d42bc87d79b9b53ea8f38673706d92e6 /indra/newview/llfavoritesbar.cpp | |
parent | 471897cfabbfec8d4dbee65c837d5884310ea61a (diff) | |
parent | c76ab6c4b7384e34a4f32f2fa820b46f6373cdc3 (diff) |
Merge
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llfavoritesbar.cpp')
-rw-r--r-- | indra/newview/llfavoritesbar.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 01603f390d..ae5be8cc7c 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -74,6 +74,7 @@ public: mName("(Loading...)"), mPosX(0), mPosY(0), + mPosZ(0), mLoaded(false) {} @@ -101,6 +102,14 @@ public: requestNameAndPos(); return mPosY; } + + S32 getPosZ() + { + if (!mLoaded) + requestNameAndPos(); + return mPosZ; + } + private: /** * Requests landmark data from server. @@ -114,14 +123,15 @@ private: if(LLLandmarkActions::getLandmarkGlobalPos(mLandmarkID, g_pos)) { LLLandmarkActions::getRegionNameAndCoordsFromPosGlobal(g_pos, - boost::bind(&LLLandmarkInfoGetter::landmarkNameCallback, this, _1, _2, _3)); + boost::bind(&LLLandmarkInfoGetter::landmarkNameCallback, this, _1, _2, _3, _4)); } } - void landmarkNameCallback(const std::string& name, S32 x, S32 y) + void landmarkNameCallback(const std::string& name, S32 x, S32 y, S32 z) { mPosX = x; mPosY = y; + mPosZ = z; mName = name; mLoaded = true; } @@ -130,6 +140,7 @@ private: std::string mName; S32 mPosX; S32 mPosY; + S32 mPosZ; bool mLoaded; }; @@ -151,7 +162,8 @@ public: if (!region_name.empty()) { LLToolTip::Params params; - params.message = llformat("%s\n%s (%d, %d)", getLabelSelected().c_str(), region_name.c_str(), mLandmarkInfoGetter.getPosX(), mLandmarkInfoGetter.getPosY()); + params.message = llformat("%s\n%s (%d, %d, %d)", getLabelSelected().c_str(), region_name.c_str(), + mLandmarkInfoGetter.getPosX(), mLandmarkInfoGetter.getPosY(), mLandmarkInfoGetter.getPosZ()); params.sticky_rect = calcScreenRect(); LLToolTipMgr::instance().show(params); } |