From 662ce8bf4a5b36e103adb0bf70f5673b28cedbf7 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 13 Jun 2009 10:29:01 -0700 Subject: Applied Aimee's patch for VWR-4106: Mini-map beacon icon doesn't display correctly when beacon position above or below camera --- linden/indra/newview/llworldmapview.cpp | 16 ++++++++++------ linden/indra/newview/llworldmapview.h | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/llworldmapview.cpp b/linden/indra/newview/llworldmapview.cpp index b6f75bc..77833c3 100644 --- a/linden/indra/newview/llworldmapview.cpp +++ b/linden/indra/newview/llworldmapview.cpp @@ -1195,6 +1195,9 @@ static void drawDot(F32 x_pixels, F32 y_pixels, } else { + // Draw V indicator for above or below + // *TODO: Replace this vector drawing with icons + F32 left = x_pixels - dot_radius; F32 right = x_pixels + dot_radius; F32 center = (left + right) * 0.5f; @@ -1203,13 +1206,14 @@ static void drawDot(F32 x_pixels, F32 y_pixels, gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); gGL.color4fv( color.mV ); - LLUI::setLineWidth(1.5f); - F32 h_bar = relative_z > HEIGHT_THRESHOLD ? top : bottom; // horizontal bar Y + LLUI::setLineWidth(3.0f); + F32 point = relative_z > HEIGHT_THRESHOLD ? top : bottom; // Y pos of the point of the V + F32 back = relative_z > HEIGHT_THRESHOLD ? bottom : top; // Y pos of the ends of the V gGL.begin( LLRender::LINES ); - gGL.vertex2f(center, top); - gGL.vertex2f(left, h_bar); - gGL.vertex2f(right, h_bar); - gGL.vertex2f(right, bottom); + gGL.vertex2f(left, back); + gGL.vertex2f(center, point); + gGL.vertex2f(center, point); + gGL.vertex2f(right, back); gGL.end(); LLUI::setLineWidth(1.0f); } diff --git a/linden/indra/newview/llworldmapview.h b/linden/indra/newview/llworldmapview.h index 7e94e19..b97dfb5 100644 --- a/linden/indra/newview/llworldmapview.h +++ b/linden/indra/newview/llworldmapview.h @@ -105,7 +105,7 @@ public: F32 y_pixels, const LLColor4& color, F32 relative_z = 0.f, - F32 dot_radius = 3.f); + F32 dot_radius = 5.f); static void drawTrackingCircle( const LLRect& rect, S32 x, S32 y, const LLColor4& color, -- cgit v1.1