From aa1fc0d6e16a0c89f276f5c1b7ef2de10fc5800f Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 2 Oct 2009 02:36:21 -0700 Subject: Draw selected avatars last (and fixed silver skin missing selection color) --- linden/indra/newview/llnetmap.cpp | 31 ++++++++++++++++++---- linden/indra/newview/skins/default/colors_base.xml | 2 +- linden/indra/newview/skins/silver/colors_base.xml | 1 + 3 files changed, 28 insertions(+), 6 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/llnetmap.cpp b/linden/indra/newview/llnetmap.cpp index f055dbc..dc4a4ae 100644 --- a/linden/indra/newview/llnetmap.cpp +++ b/linden/indra/newview/llnetmap.cpp @@ -345,7 +345,7 @@ void LLNetMap::draw() LLColor4 muted_color = gColors.getColor( "MapMuted" ); LLColor4 selected_color = gColors.getColor( "MapSelected" ); LLColor4 glyph_color; - F32 glyph_radius; + int selected = -1; std::vector avatar_ids; std::vector positions; @@ -356,14 +356,14 @@ void LLNetMap::draw() // just be careful to sort the avatar IDs along with the positions. -MG pos_map = globalPosToView(positions[i], rotate_map); + // Save this entry to draw last if (LLFloaterMap::getSelected() == avatar_ids[i]) { - glyph_radius = mDotRadius * 1.7f; - glyph_color = selected_color; + selected = i; + continue; } else { - glyph_radius = mDotRadius; // Show them muted even if they're friends if (LLMuteList::getInstance()->isMuted(avatar_ids[i])) { @@ -392,7 +392,7 @@ void LLNetMap::draw() pos_map.mV[VX], pos_map.mV[VY], glyph_color, pos_map.mV[VZ], - glyph_radius); + mDotRadius); F32 dist_to_cursor = dist_vec(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), LLVector2(local_mouse_x,local_mouse_y)); if(dist_to_cursor < min_pick_dist && dist_to_cursor < closest_dist) @@ -402,6 +402,27 @@ void LLNetMap::draw() } } + // Draw dot for selected avatar last + if (selected >= 0) + { + pos_map = globalPosToView(positions[selected], rotate_map); + F32 glyph_radius = mDotRadius * 1.7f; + glyph_color = selected_color; + + LLWorldMapView::drawAvatar( + pos_map.mV[VX], pos_map.mV[VY], + glyph_color, + pos_map.mV[VZ], + glyph_radius); + + F32 dist_to_cursor = dist_vec(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), LLVector2(local_mouse_x,local_mouse_y)); + if(dist_to_cursor < min_pick_dist && dist_to_cursor < closest_dist) + { + closest_dist = dist_to_cursor; + mClosestAgentToCursor = avatar_ids[selected]; + } + } + // Draw dot for autopilot target if (gAgent.getAutoPilot()) { diff --git a/linden/indra/newview/skins/default/colors_base.xml b/linden/indra/newview/skins/default/colors_base.xml index 8f0fc29..854c027 100644 --- a/linden/indra/newview/skins/default/colors_base.xml +++ b/linden/indra/newview/skins/default/colors_base.xml @@ -162,7 +162,7 @@ - + diff --git a/linden/indra/newview/skins/silver/colors_base.xml b/linden/indra/newview/skins/silver/colors_base.xml index 6a94489..f129230 100644 --- a/linden/indra/newview/skins/silver/colors_base.xml +++ b/linden/indra/newview/skins/silver/colors_base.xml @@ -162,6 +162,7 @@ + -- cgit v1.1 From 58aab90cbff6035a2e31bde404b8ceda1fc3ca66 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 2 Oct 2009 05:17:31 -0700 Subject: Draw Imprudence developers as purple dots in the mini-map (name list in LLFloaterMap) --- linden/indra/newview/llfloatermap.cpp | 15 +++++++++++++++ linden/indra/newview/llfloatermap.h | 2 ++ linden/indra/newview/llnetmap.cpp | 7 ++++++- linden/indra/newview/skins/default/colors_base.xml | 1 + linden/indra/newview/skins/silver/colors_base.xml | 1 + 5 files changed, 25 insertions(+), 1 deletion(-) (limited to 'linden') diff --git a/linden/indra/newview/llfloatermap.cpp b/linden/indra/newview/llfloatermap.cpp index 6d23ab4..c60f07f 100644 --- a/linden/indra/newview/llfloatermap.cpp +++ b/linden/indra/newview/llfloatermap.cpp @@ -194,6 +194,21 @@ void LLFloaterMap::open() */ //static +bool LLFloaterMap::isImpDev(LLUUID agent_id) +{ + // We use strings here as avatar keys change across grids. + // Feel free to add/remove yourself. + std::string agent_name = getSelectedName(agent_id); + if (agent_name == "McCabe Maxsted" || + agent_name == "Jacek Antonelli" || + agent_name == "Armin Weatherwax") + { + return true; + } + return false; +} + +//static void LLFloaterMap::updateRadar() { LLFloaterMap::getInstance()->populateRadar(); diff --git a/linden/indra/newview/llfloatermap.h b/linden/indra/newview/llfloatermap.h index 81e4159..349b0e6 100644 --- a/linden/indra/newview/llfloatermap.h +++ b/linden/indra/newview/llfloatermap.h @@ -49,6 +49,8 @@ public: static void updateRadar(); static LLUUID getSelected(); + // returns true if agent_id belongs to a developer listed in llfloatermap.cpp + static bool isImpDev(LLUUID agent_id); BOOL postBuild(); diff --git a/linden/indra/newview/llnetmap.cpp b/linden/indra/newview/llnetmap.cpp index dc4a4ae..5aaee1a 100644 --- a/linden/indra/newview/llnetmap.cpp +++ b/linden/indra/newview/llnetmap.cpp @@ -344,6 +344,7 @@ void LLNetMap::draw() LLColor4 friend_color = gColors.getColor( "MapFriend" ); LLColor4 muted_color = gColors.getColor( "MapMuted" ); LLColor4 selected_color = gColors.getColor( "MapSelected" ); + LLColor4 imp_dev_color = gColors.getColor( "MapImpDev" ); LLColor4 glyph_color; int selected = -1; @@ -369,6 +370,10 @@ void LLNetMap::draw() { glyph_color = muted_color; } + else if (LLFloaterMap::isImpDev(avatar_ids[i])) + { + glyph_color = imp_dev_color; + } else if (is_agent_friend(avatar_ids[i])) { glyph_color = friend_color; @@ -403,7 +408,7 @@ void LLNetMap::draw() } // Draw dot for selected avatar last - if (selected >= 0) + if (selected >= 0 && avatar_ids[selected].notNull()) { pos_map = globalPosToView(positions[selected], rotate_map); F32 glyph_radius = mDotRadius * 1.7f; diff --git a/linden/indra/newview/skins/default/colors_base.xml b/linden/indra/newview/skins/default/colors_base.xml index 854c027..14265e0 100644 --- a/linden/indra/newview/skins/default/colors_base.xml +++ b/linden/indra/newview/skins/default/colors_base.xml @@ -163,6 +163,7 @@ + diff --git a/linden/indra/newview/skins/silver/colors_base.xml b/linden/indra/newview/skins/silver/colors_base.xml index f129230..6dc98dc 100644 --- a/linden/indra/newview/skins/silver/colors_base.xml +++ b/linden/indra/newview/skins/silver/colors_base.xml @@ -163,6 +163,7 @@ + -- cgit v1.1 From 9d165087f0d812315c4ecb4078f3ee163160c50b Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 2 Oct 2009 05:20:43 -0700 Subject: Added mini-map partner dot color for future use (currently unused) --- linden/indra/newview/skins/default/colors_base.xml | 1 + linden/indra/newview/skins/silver/colors_base.xml | 1 + 2 files changed, 2 insertions(+) (limited to 'linden') diff --git a/linden/indra/newview/skins/default/colors_base.xml b/linden/indra/newview/skins/default/colors_base.xml index 14265e0..b90f8aa 100644 --- a/linden/indra/newview/skins/default/colors_base.xml +++ b/linden/indra/newview/skins/default/colors_base.xml @@ -164,6 +164,7 @@ + diff --git a/linden/indra/newview/skins/silver/colors_base.xml b/linden/indra/newview/skins/silver/colors_base.xml index 6dc98dc..f9bf283 100644 --- a/linden/indra/newview/skins/silver/colors_base.xml +++ b/linden/indra/newview/skins/silver/colors_base.xml @@ -164,6 +164,7 @@ + -- cgit v1.1 From 153e86b038796e5f449bd084f432a18e12725c6b Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 2 Oct 2009 22:18:02 -0700 Subject: Applied clickable object names for whisper/say/shout from Emerald viewer --- linden/indra/newview/llviewermessage.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'linden') diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index d900cd9..47231fb 100644 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp @@ -2436,6 +2436,32 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) is_owned_by_me = chatter->permYouOwner(); } + if(chat.mSourceType == CHAT_SOURCE_OBJECT + && chat.mChatType != CHAT_TYPE_DEBUG_MSG + && !owner_id.isNull() + && owner_id != gAgent.getID()) + { + std::string tempname = from_name; + + size_t found = tempname.find(" "); + while(found != std::string::npos) + { + tempname.replace(found, 1, ""); + found = tempname.find(" "); + } + + if (tempname.length() < 1) + { + from_name = "no name"; + chat.mFromName = from_name; + } + + // std::string ownername; + // if(gCacheName->getFullName(owner_id,ownername)) + // from_name += (" (" + ownername + ")"); + chat.mURL = llformat("secondlife:///app/agent/%s/about",owner_id.asString().c_str()); + } + if (is_audible) { BOOL visible_in_chat_bubble = FALSE; -- cgit v1.1 From 955eebfadc1299505d66eee7886ef41ea888a30a Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 3 Oct 2009 04:04:04 -0700 Subject: Object IMs are now prefixed with 'IM: '. As a side effect, names are now clickable when show IMs in chat is enabled --- linden/indra/newview/llfloaterchat.cpp | 20 ++++++++++++++++---- linden/indra/newview/llviewermessage.cpp | 2 +- 2 files changed, 17 insertions(+), 5 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/llfloaterchat.cpp b/linden/indra/newview/llfloaterchat.cpp index 1f34ad0..a4082fd 100644 --- a/linden/indra/newview/llfloaterchat.cpp +++ b/linden/indra/newview/llfloaterchat.cpp @@ -213,11 +213,23 @@ void add_timestamped_line(LLViewerTextEditor* edit, LLChat chat, const LLColor4& } // If the chat line has an associated url, link it up to the name. - if (!chat.mURL.empty() - && (line.length() > chat.mFromName.length() && line.find(chat.mFromName,0) == 0)) + if (!chat.mURL.empty() && + (line.length() > chat.mFromName.length() && + (line.find(chat.mFromName,0) == 4 || line.find(chat.mFromName,0) == 0))) { - std::string start_line = line.substr(0, chat.mFromName.length() + 1); - line = line.substr(chat.mFromName.length() + 1); + std::string start_line; + if (line.find(chat.mFromName,0) == 4) // IMs are prefaced with "IM: " + { + start_line = line.substr(4, chat.mFromName.length() + 1); + std::string source = line.substr(0, 4); + edit->appendColoredText(source, false, prepend_newline, color); + line = line.substr(chat.mFromName.length() + 5); + } + else + { + start_line = line.substr(0, chat.mFromName.length() + 1); + line = line.substr(chat.mFromName.length() + 1); + } const LLStyleSP &sourceStyle = LLStyleMap::instance().lookup(chat.mFromID,chat.mURL); edit->appendStyledText(start_line, false, prepend_newline, sourceStyle); prepend_newline = false; diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index 47231fb..e01aa4f 100644 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp @@ -1929,7 +1929,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) { return; } - chat.mText = name + separator_string + message.substr(message_offset); + chat.mText = std::string("IM: ") + name + separator_string + message.substr(message_offset); chat.mFromName = name; // Build a link to open the object IM info window. -- cgit v1.1 From f6c7d16cbcfc04448917fd726548471085f7bf37 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 3 Oct 2009 04:10:17 -0700 Subject: Fixed 1.2 beta features missing from silver skin --- .../skins/silver/xui/en-us/floater_chatterbox.xml | 12 ----------- .../silver/xui/en-us/floater_windlight_options.xml | 24 ++++++++++++++-------- 2 files changed, 15 insertions(+), 21 deletions(-) delete mode 100644 linden/indra/newview/skins/silver/xui/en-us/floater_chatterbox.xml (limited to 'linden') diff --git a/linden/indra/newview/skins/silver/xui/en-us/floater_chatterbox.xml b/linden/indra/newview/skins/silver/xui/en-us/floater_chatterbox.xml deleted file mode 100644 index 025a616..0000000 --- a/linden/indra/newview/skins/silver/xui/en-us/floater_chatterbox.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/linden/indra/newview/skins/silver/xui/en-us/floater_windlight_options.xml b/linden/indra/newview/skins/silver/xui/en-us/floater_windlight_options.xml index 11859cc..d801251 100644 --- a/linden/indra/newview/skins/silver/xui/en-us/floater_windlight_options.xml +++ b/linden/indra/newview/skins/silver/xui/en-us/floater_windlight_options.xml @@ -4,29 +4,35 @@ min_width="400" mouse_opaque="true" name="WindLight floater" rect_control="FloaterAdvancedSkyRect" title="Advanced Sky Editor" width="700"> - - Sky Presets: - - + +