From 3e47e61a5d88cdaadc34bc6ad4787c0a9d405b2e Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 13 Jun 2009 07:05:13 -0700 Subject: Show muted avatars as grey in the mini-map --- linden/indra/newview/llnetmap.cpp | 20 +++++++++++++++++++- linden/indra/newview/llworldmapview.cpp | 20 +++++++++++++++++--- linden/indra/newview/skins/default/colors_base.xml | 1 + linden/indra/newview/skins/silver/colors_base.xml | 1 + 4 files changed, 38 insertions(+), 4 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/llnetmap.cpp b/linden/indra/newview/llnetmap.cpp index 999a2fe..35982c8 100644 --- a/linden/indra/newview/llnetmap.cpp +++ b/linden/indra/newview/llnetmap.cpp @@ -47,6 +47,7 @@ #include "llfloateravatarinfo.h" #include "llfloaterworldmap.h" #include "llframetimer.h" +#include "llmutelist.h" #include "lltracker.h" #include "llmenugl.h" #include "llsurface.h" @@ -327,6 +328,9 @@ void LLNetMap::draw() // Draw avatars LLColor4 avatar_color = gColors.getColor( "MapAvatar" ); LLColor4 friend_color = gColors.getColor( "MapFriend" ); + LLColor4 muted_color = gColors.getColor( "MapMuted" ); + LLColor4 glyph_color; + std::vector avatar_ids; std::vector positions; LLWorld::getInstance()->getAvatars(&avatar_ids, &positions); @@ -336,9 +340,23 @@ void LLNetMap::draw() // just be careful to sort the avatar IDs along with the positions. -MG pos_map = globalPosToView(positions[i], rotate_map); + // Show them muted even if they're friends + if (LLMuteList::getInstance()->isMuted(avatar_ids[i])) + { + glyph_color = muted_color; + } + else if (is_agent_friend(avatar_ids[i])) + { + glyph_color = friend_color; + } + else + { + glyph_color = avatar_color; + } + LLWorldMapView::drawAvatar( pos_map.mV[VX], pos_map.mV[VY], - is_agent_friend(avatar_ids[i]) ? friend_color : avatar_color, + glyph_color, pos_map.mV[VZ]); F32 dist_to_cursor = dist_vec(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), LLVector2(local_mouse_x,local_mouse_y)); diff --git a/linden/indra/newview/llworldmapview.cpp b/linden/indra/newview/llworldmapview.cpp index 73c2d8b..b6f75bc 100644 --- a/linden/indra/newview/llworldmapview.cpp +++ b/linden/indra/newview/llworldmapview.cpp @@ -49,6 +49,7 @@ #include "llfloatermap.h" #include "llfloaterworldmap.h" #include "llfocusmgr.h" +//#include "llmutelist.h" info not being sent #include "lltextbox.h" #include "lltextureview.h" #include "lltracker.h" @@ -866,7 +867,9 @@ void LLWorldMapView::drawAgents() F32 agents_scale = (gMapScale * 0.9f) / 256.f; LLColor4 avatar_color = gColors.getColor( "MapAvatar" ); - LLColor4 friend_color = gColors.getColor( "MapFriend" ); + /*LLColor4 friend_color = gColors.getColor( "MapFriend" ); + LLColor4 muted_color = gColors.getColor( "MapMuted" ); + LLColor4 glyph_color;*/ for (handle_list_t::iterator iter = mVisibleRegions.begin(); iter != mVisibleRegions.end(); ++iter) { @@ -889,7 +892,18 @@ void LLWorldMapView::drawAgents() S32 agent_count = info.mExtra; sim_agent_count += info.mExtra; // Here's how we'd choose the color if info.mID were available but it's not being sent: - //LLColor4 color = (agent_count == 1 && is_agent_friend(info.mID)) ? friend_color : avatar_color; + /*if (agent_count == 1 && LLMuteList::getInstance()->isMuted(info.mID)) + { + glyph_color = muted_color; + } + else if (agent_count == 1 && is_agent_friend(info.mID)) + { + glyph_color = friend_color; + } + else + { + glyph_color = avatar_color; + }*/ drawImageStack(info.mPosGlobal, sAvatarSmallImage, agent_count, 3.f, avatar_color); } LLWorldMap::getInstance()->mNumAgents[handle] = sim_agent_count; // override mNumAgents for this sim @@ -905,7 +919,7 @@ void LLWorldMapView::drawAgents() region_center[VY] += REGION_WIDTH_METERS / 2; // Reduce the stack size as you zoom out - always display at lease one agent where there is one or more S32 agent_count = (S32)(((num_agents-1) * agents_scale + (num_agents-1) * 0.1f)+.1f) + 1; - drawImageStack(region_center, sAvatarSmallImage, agent_count, 3.f, glyph_color_avatar); + drawImageStack(region_center, sAvatarSmallImage, agent_count, 3.f, avatar_color); } } } diff --git a/linden/indra/newview/skins/default/colors_base.xml b/linden/indra/newview/skins/default/colors_base.xml index 1f97a2e..42cb0ac 100644 --- a/linden/indra/newview/skins/default/colors_base.xml +++ b/linden/indra/newview/skins/default/colors_base.xml @@ -159,6 +159,7 @@ + diff --git a/linden/indra/newview/skins/silver/colors_base.xml b/linden/indra/newview/skins/silver/colors_base.xml index 9ec721c..a69f43f 100644 --- a/linden/indra/newview/skins/silver/colors_base.xml +++ b/linden/indra/newview/skins/silver/colors_base.xml @@ -159,6 +159,7 @@ + -- cgit v1.1