summaryrefslogtreecommitdiff
path: root/indra/newview/llworldmapview.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-07-27 19:37:18 +0300
committerGitHub <noreply@github.com>2024-07-27 19:37:18 +0300
commit0a6f28209e2be86462428a6f779b465e3604e831 (patch)
treeb968655ced36ef127b028819e9edb509861a76ca /indra/newview/llworldmapview.cpp
parente008b44fd88be83426812e67707896e970947c49 (diff)
parent817bc25b2732dc23295e6a7ac0da5ad142e33434 (diff)
Merge branch 'develop' into marchcat/b-develop
Diffstat (limited to 'indra/newview/llworldmapview.cpp')
-rwxr-xr-xindra/newview/llworldmapview.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index a0eec1e941..4757bd42e0 100755
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -1023,18 +1023,20 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4&
drawImage(pos_global, sTrackCircleImage, color);
}
- // clamp text position to on-screen
- 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() - font->getLineHeight() - TEXT_PADDING - vert_offset);
-
if (label != "")
{
- font->renderUTF8(
- label, 0,
- text_x,
- text_y,
+ // clamp text position to on-screen
+ const S32 TEXT_PADDING = DEFAULT_TRACKING_ARROW_SIZE + 2;
+
+ LLWString wlabel = utf8string_to_wstring(label);
+ S32 half_text_width = llfloor(font->getWidthF32(wlabel.c_str()) * 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() - font->getLineHeight() - TEXT_PADDING - vert_offset);
+
+ font->render(
+ wlabel, 0,
+ (F32)text_x,
+ (F32)text_y,
LLColor4::white, LLFontGL::HCENTER,
LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW);