diff options
author | William Todd Stinson <stinson@lindenlab.com> | 2012-02-25 22:27:06 -0800 |
---|---|---|
committer | William Todd Stinson <stinson@lindenlab.com> | 2012-02-25 22:27:06 -0800 |
commit | 9b06300e2c94eae83a29637073f65d4ffc73bf6d (patch) | |
tree | 8d109a1e072f066fa2739b063291c05a95983f8e /indra/newview/llfloaterpathfindinglinksets.cpp | |
parent | 8bfb24373b429b752d4b2b1ca6452f0eb755e383 (diff) |
PATH-292: Adding the ability to view and edit pathfinding attributes of the terrain.
Diffstat (limited to 'indra/newview/llfloaterpathfindinglinksets.cpp')
-rw-r--r-- | indra/newview/llfloaterpathfindinglinksets.cpp | 55 |
1 files changed, 38 insertions, 17 deletions
diff --git a/indra/newview/llfloaterpathfindinglinksets.cpp b/indra/newview/llfloaterpathfindinglinksets.cpp index 6dd9a7ced3..cabbe1d130 100644 --- a/indra/newview/llfloaterpathfindinglinksets.cpp +++ b/indra/newview/llfloaterpathfindinglinksets.cpp @@ -610,7 +610,7 @@ void LLFloaterPathfindingLinksets::updateScrollList() linksetIter != mLinksetsListPtr->end(); ++linksetIter)
{
const LLPathfindingLinksetPtr linksetPtr(linksetIter->second);
- std::string linksetName = linksetPtr->getName();
+ std::string linksetName = (linksetPtr->isTerrain() ? getString("linkset_terrain_name") : linksetPtr->getName());
std::string linksetDescription = linksetPtr->getDescription();
LLStringUtil::toUpper(linksetName);
LLStringUtil::toUpper(linksetDescription);
@@ -643,22 +643,43 @@ void LLFloaterPathfindingLinksets::updateScrollList() LLSD LLFloaterPathfindingLinksets::buildScrollListElement(const LLPathfindingLinksetPtr pLinksetPtr, const LLVector3 &pAvatarPosition)
{
LLSD columns;
-
- columns[0]["column"] = "name";
- columns[0]["value"] = pLinksetPtr->getName();
- columns[0]["font"] = "SANSSERIF";
-
- columns[1]["column"] = "description";
- columns[1]["value"] = pLinksetPtr->getDescription();
- columns[1]["font"] = "SANSSERIF";
-
- columns[2]["column"] = "land_impact";
- columns[2]["value"] = llformat("%1d", pLinksetPtr->getLandImpact());
- columns[2]["font"] = "SANSSERIF";
-
- columns[3]["column"] = "dist_from_you";
- columns[3]["value"] = llformat("%1.0f m", dist_vec(pAvatarPosition, pLinksetPtr->getLocation()));
- columns[3]["font"] = "SANSSERIF";
+
+ if (pLinksetPtr->isTerrain())
+ {
+ columns[0]["column"] = "name";
+ columns[0]["value"] = getString("linkset_terrain_name");
+ columns[0]["font"] = "SANSSERIF";
+
+ columns[1]["column"] = "description";
+ columns[1]["value"] = getString("linkset_terrain_description");
+ columns[1]["font"] = "SANSSERIF";
+
+ columns[2]["column"] = "land_impact";
+ columns[2]["value"] = getString("linkset_terrain_land_impact");
+ columns[2]["font"] = "SANSSERIF";
+
+ columns[3]["column"] = "dist_from_you";
+ columns[3]["value"] = getString("linkset_terrain_dist_from_you");
+ columns[3]["font"] = "SANSSERIF";
+ }
+ else
+ {
+ columns[0]["column"] = "name";
+ columns[0]["value"] = pLinksetPtr->getName();
+ columns[0]["font"] = "SANSSERIF";
+
+ columns[1]["column"] = "description";
+ columns[1]["value"] = pLinksetPtr->getDescription();
+ columns[1]["font"] = "SANSSERIF";
+
+ columns[2]["column"] = "land_impact";
+ columns[2]["value"] = llformat("%1d", pLinksetPtr->getLandImpact());
+ columns[2]["font"] = "SANSSERIF";
+
+ columns[3]["column"] = "dist_from_you";
+ columns[3]["value"] = llformat("%1.0f m", dist_vec(pAvatarPosition, pLinksetPtr->getLocation()));
+ columns[3]["font"] = "SANSSERIF";
+ }
columns[4]["column"] = "linkset_use";
std::string linksetUse;
|