aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llworldmapview.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-09-22 08:18:22 -0700
committerMcCabe Maxsted2009-09-22 08:18:22 -0700
commitae109e01799d9270e9caa54761c7e3496b87ad1f (patch)
treedd768160b92656e2a3a26ac4ce1d709267227a7e /linden/indra/newview/llworldmapview.cpp
parentChanged 'Presets' button to 'Sky' (diff)
downloadmeta-impy-ae109e01799d9270e9caa54761c7e3496b87ad1f.zip
meta-impy-ae109e01799d9270e9caa54761c7e3496b87ad1f.tar.gz
meta-impy-ae109e01799d9270e9caa54761c7e3496b87ad1f.tar.bz2
meta-impy-ae109e01799d9270e9caa54761c7e3496b87ad1f.tar.xz
Applied Jacek's patch to show number of avatars in world map
Diffstat (limited to 'linden/indra/newview/llworldmapview.cpp')
-rw-r--r--linden/indra/newview/llworldmapview.cpp31
1 files changed, 29 insertions, 2 deletions
diff --git a/linden/indra/newview/llworldmapview.cpp b/linden/indra/newview/llworldmapview.cpp
index 5e51e6f..2b22b9d 100644
--- a/linden/indra/newview/llworldmapview.cpp
+++ b/linden/indra/newview/llworldmapview.cpp
@@ -651,6 +651,33 @@ void LLWorldMapView::draw()
651 { 651 {
652 mesg = llformat( "%s (%s)", info->mName.c_str(), sStringsMap["offline"].c_str()); 652 mesg = llformat( "%s (%s)", info->mName.c_str(), sStringsMap["offline"].c_str());
653 } 653 }
654 else if (gSavedSettings.getBOOL("MapShowAgentCount") && gSavedSettings.getBOOL("MapShowPeople"))
655 {
656 // Display the agent count after the region name
657 S32 agent_count = LLWorldMap::getInstance()->mNumAgents[handle];
658 LLViewerRegion *region = gAgent.getRegion();
659
660 if (region && region->getHandle() == info->mHandle)
661 {
662 ++agent_count; // Bump by 1 if we're in this region
663 }
664
665 if (agent_count > 0)
666 {
667 //TODO: move this and the tooltip strings into XML
668 std::string count = llformat("%d %s", agent_count, agent_count > 1 ? "avatars" : "avatar");
669 font->renderUTF8(
670 count, 0,
671 llfloor(left + 3),
672 llfloor(bottom + 20),
673 LLColor4::white,
674 LLFontGL::LEFT,
675 LLFontGL::BASELINE,
676 LLFontGL::DROP_SHADOW);
677
678 mesg = info->mName;
679 }
680 }
654 else 681 else
655 { 682 {
656 mesg = info->mName; 683 mesg = info->mName;
@@ -1161,11 +1188,11 @@ BOOL LLWorldMapView::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* stic
1161 1188
1162 if (agent_count == 1) 1189 if (agent_count == 1)
1163 { 1190 {
1164 message += "person"; 1191 message += "avatar";
1165 } 1192 }
1166 else 1193 else
1167 { 1194 {
1168 message += "people"; 1195 message += "avatars";
1169 } 1196 }
1170 } 1197 }
1171 } 1198 }