summaryrefslogtreecommitdiff
path: root/indra/newview/llhudtext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llhudtext.cpp')
-rw-r--r--indra/newview/llhudtext.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp
index 8d1d27444b..7f9eddc837 100644
--- a/indra/newview/llhudtext.cpp
+++ b/indra/newview/llhudtext.cpp
@@ -207,10 +207,11 @@ BOOL LLHUDText::lineSegmentIntersect(const LLVector3& start, const LLVector3& en
}
LLVector3 dir = end-start;
- F32 t = 0.f;
+ F32 a,b,t;
- if (LLTriangleRayIntersect(v[0], v[1], v[2], start, dir, NULL, NULL, &t, FALSE) ||
- LLTriangleRayIntersect(v[2], v[3], v[0], start, dir, NULL, NULL, &t, FALSE) )
+
+ if (LLTriangleRayIntersect(v[0], v[1], v[2], start, dir, a, b, t, FALSE) ||
+ LLTriangleRayIntersect(v[2], v[3], v[0], start, dir, a, b, t, FALSE) )
{
if (t <= 1.f)
{
@@ -567,6 +568,18 @@ void LLHUDText::setStringUTF8(const std::string &wtext)
setString(utf8str_to_wstring(wtext));
}
+std::string LLHUDText::getString()
+{
+ std::ostringstream ostr;
+ for (U32 i = 0; i < mTextSegments.size(); ++i)
+ {
+ const std::string str = wstring_to_utf8str(mTextSegments[i].getText());
+ ostr << str;
+ }
+
+ return ostr.str();
+}
+
void LLHUDText::setString(const LLWString &wtext)
{
mTextSegments.clear();