diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-05-02 13:00:59 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-05-02 13:00:59 -0400 |
commit | 678864e4ed497de7d17e02fa79b93be54379a5b8 (patch) | |
tree | f946f0f5ffc116d2ba9c9ada237eb70594966ee6 /indra/newview/llworldmapview.cpp | |
parent | 78fec489b53434a8ac8f9c0a8e72fd883067ce42 (diff) | |
parent | d6569db3520f7e0ce2d93febb6f4e26b48c08a3d (diff) |
merge viewer-release to drano
Diffstat (limited to 'indra/newview/llworldmapview.cpp')
-rw-r--r-- | indra/newview/llworldmapview.cpp | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index e50851b8e7..a3ccf87cfc 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -77,6 +77,7 @@ LLUIImagePtr LLWorldMapView::sAvatarYouLargeImage = NULL; LLUIImagePtr LLWorldMapView::sAvatarLevelImage = NULL; LLUIImagePtr LLWorldMapView::sAvatarAboveImage = NULL; LLUIImagePtr LLWorldMapView::sAvatarBelowImage = NULL; +LLUIImagePtr LLWorldMapView::sAvatarUnknownImage = NULL; LLUIImagePtr LLWorldMapView::sTelehubImage = NULL; LLUIImagePtr LLWorldMapView::sInfohubImage = NULL; @@ -120,6 +121,7 @@ void LLWorldMapView::initClass() sAvatarLevelImage = LLUI::getUIImage("map_avatar_32.tga"); sAvatarAboveImage = LLUI::getUIImage("map_avatar_above_32.tga"); sAvatarBelowImage = LLUI::getUIImage("map_avatar_below_32.tga"); + sAvatarUnknownImage = LLUI::getUIImage("map_avatar_unknown_32.tga"); sHomeImage = LLUI::getUIImage("map_home.tga"); sTelehubImage = LLUI::getUIImage("map_telehub.tga"); @@ -149,6 +151,7 @@ void LLWorldMapView::cleanupClass() sAvatarLevelImage = NULL; sAvatarAboveImage = NULL; sAvatarBelowImage = NULL; + sAvatarUnknownImage = NULL; sTelehubImage = NULL; sInfohubImage = NULL; @@ -513,7 +516,7 @@ void LLWorldMapView::draw() TRUE, "You are here", "", - llround(LLFontGL::getFontSansSerifSmall()->getLineHeight())); // offset vertically by one line, to avoid overlap with target tracking + LLFontGL::getFontSansSerifSmall()->getLineHeight()); // offset vertically by one line, to avoid overlap with target tracking } // Draw the current agent viewing angle @@ -992,7 +995,7 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4& const S32 TEXT_PADDING = DEFAULT_TRACKING_ARROW_SIZE + 2; S32 half_text_width = llfloor(font->getWidthF32(label) * 0.5f); text_x = llclamp(text_x, half_text_width + TEXT_PADDING, getRect().getWidth() - half_text_width - TEXT_PADDING); - text_y = llclamp(text_y + vert_offset, TEXT_PADDING + vert_offset, getRect().getHeight() - llround(font->getLineHeight()) - TEXT_PADDING - vert_offset); + text_y = llclamp(text_y + vert_offset, TEXT_PADDING + vert_offset, getRect().getHeight() - font->getLineHeight() - TEXT_PADDING - vert_offset); if (label != "") { @@ -1005,7 +1008,7 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4& if (tooltip != "") { - text_y -= (S32)font->getLineHeight(); + text_y -= font->getLineHeight(); font->renderUTF8( tooltip, 0, @@ -1147,17 +1150,25 @@ void LLWorldMapView::drawAvatar(F32 x_pixels, F32 y_pixels, const LLColor4& color, F32 relative_z, - F32 dot_radius) + F32 dot_radius, + bool unknown_relative_z) { const F32 HEIGHT_THRESHOLD = 7.f; LLUIImagePtr dot_image = sAvatarLevelImage; - if(relative_z < -HEIGHT_THRESHOLD) + if (unknown_relative_z) { - dot_image = sAvatarBelowImage; + dot_image = sAvatarUnknownImage; } - else if(relative_z > HEIGHT_THRESHOLD) - { - dot_image = sAvatarAboveImage; + else + { + if(relative_z < -HEIGHT_THRESHOLD) + { + dot_image = sAvatarBelowImage; + } + else if(relative_z > HEIGHT_THRESHOLD) + { + dot_image = sAvatarAboveImage; + } } S32 dot_width = llround(dot_radius * 2.f); dot_image->draw(llround(x_pixels - dot_radius), @@ -1203,7 +1214,7 @@ void LLWorldMapView::drawIconName(F32 x_pixels, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW); - text_y -= llround(LLFontGL::getFontSansSerif()->getLineHeight()); + text_y -= LLFontGL::getFontSansSerif()->getLineHeight(); // render text LLFontGL::getFontSansSerif()->renderUTF8(second_line, 0, |