aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
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
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')
-rw-r--r--linden/indra/newview/app_settings/settings.xml11
-rw-r--r--linden/indra/newview/llworldmapview.cpp31
2 files changed, 40 insertions, 2 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index f4d853b..5fed08e 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -4808,6 +4808,17 @@
4808 <key>Value</key> 4808 <key>Value</key>
4809 <real>128.0</real> 4809 <real>128.0</real>
4810 </map> 4810 </map>
4811 <key>MapShowAgentCount</key>
4812 <map>
4813 <key>Comment</key>
4814 <string>Show number of agents next to region names on world map</string>
4815 <key>Persist</key>
4816 <integer>1</integer>
4817 <key>Type</key>
4818 <string>Boolean</string>
4819 <key>Value</key>
4820 <integer>1</integer>
4821 </map>
4811 <key>MapShowEvents</key> 4822 <key>MapShowEvents</key>
4812 <map> 4823 <map>
4813 <key>Comment</key> 4824 <key>Comment</key>
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 }