aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/lltextbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llui/lltextbox.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/linden/indra/llui/lltextbox.cpp b/linden/indra/llui/lltextbox.cpp
index d2dae30..1422e0a 100644
--- a/linden/indra/llui/lltextbox.cpp
+++ b/linden/indra/llui/lltextbox.cpp
@@ -12,12 +12,12 @@
12 * ("GPL"), unless you have obtained a separate licensing agreement 12 * ("GPL"), unless you have obtained a separate licensing agreement
13 * ("Other License"), formally executed by you and Linden Lab. Terms of 13 * ("Other License"), formally executed by you and Linden Lab. Terms of
14 * the GPL can be found in doc/GPL-license.txt in this distribution, or 14 * the GPL can be found in doc/GPL-license.txt in this distribution, or
15 * online at http://secondlife.com/developers/opensource/gplv2 15 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16 * 16 *
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlife.com/developers/opensource/flossexception 20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 21 *
22 * By copying, modifying or distributing this software, you acknowledge 22 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 23 * that you have read and understood your obligations described above,
@@ -56,6 +56,7 @@ LLTextBox::LLTextBox(const LLString& name, const LLRect& rect, const LLString& t
56 mBorderVisible( FALSE ), 56 mBorderVisible( FALSE ),
57 mFontStyle(LLFontGL::DROP_SHADOW_SOFT), 57 mFontStyle(LLFontGL::DROP_SHADOW_SOFT),
58 mBorderDropShadowVisible( FALSE ), 58 mBorderDropShadowVisible( FALSE ),
59 mUseEllipses( FALSE ),
59 mHPad(0), 60 mHPad(0),
60 mVPad(0), 61 mVPad(0),
61 mHAlign( LLFontGL::LEFT ), 62 mHAlign( LLFontGL::LEFT ),
@@ -84,6 +85,7 @@ LLTextBox::LLTextBox(const LLString& name, const LLString& text, F32 max_width,
84 mBorderVisible(FALSE), 85 mBorderVisible(FALSE),
85 mFontStyle(LLFontGL::DROP_SHADOW_SOFT), 86 mFontStyle(LLFontGL::DROP_SHADOW_SOFT),
86 mBorderDropShadowVisible(FALSE), 87 mBorderDropShadowVisible(FALSE),
88 mUseEllipses( FALSE ),
87 mHPad(0), 89 mHPad(0),
88 mVPad(0), 90 mVPad(0),
89 mHAlign(LLFontGL::LEFT), 91 mHAlign(LLFontGL::LEFT),
@@ -174,7 +176,7 @@ BOOL LLTextBox::handleHover(S32 x, S32 y, MASK mask)
174 mHasHover = TRUE; // This should be set every frame during a hover. 176 mHasHover = TRUE; // This should be set every frame during a hover.
175 return TRUE; 177 return TRUE;
176 } 178 }
177 return FALSE; 179 return LLView::handleHover(x,y,mask);
178} 180}
179 181
180void LLTextBox::setText(const LLStringExplicit& text) 182void LLTextBox::setText(const LLStringExplicit& text)
@@ -393,7 +395,7 @@ void LLTextBox::drawText( S32 x, S32 y, const LLColor4& color )
393 mFontGL->render(mText.getWString(), cur_pos, (F32)x, (F32)y, color, 395 mFontGL->render(mText.getWString(), cur_pos, (F32)x, (F32)y, color,
394 mHAlign, mVAlign, 396 mHAlign, mVAlign,
395 mFontStyle, 397 mFontStyle,
396 line_length, mRect.getWidth(), NULL, TRUE ); 398 line_length, mRect.getWidth(), NULL, TRUE, mUseEllipses );
397 cur_pos += line_length + 1; 399 cur_pos += line_length + 1;
398 y -= llfloor(mFontGL->getLineHeight()); 400 y -= llfloor(mFontGL->getLineHeight());
399 } 401 }
@@ -403,7 +405,7 @@ void LLTextBox::drawText( S32 x, S32 y, const LLColor4& color )
403 mFontGL->render(mText.getWString(), 0, (F32)x, (F32)y, color, 405 mFontGL->render(mText.getWString(), 0, (F32)x, (F32)y, color,
404 mHAlign, mVAlign, 406 mHAlign, mVAlign,
405 mFontStyle, 407 mFontStyle,
406 S32_MAX, mRect.getWidth(), NULL, TRUE); 408 S32_MAX, mRect.getWidth(), NULL, TRUE, mUseEllipses);
407 } 409 }
408} 410}
409 411
@@ -481,7 +483,7 @@ LLView* LLTextBox::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *f
481 text_box->mFontStyle = LLFontGL::getStyleFromString(font_style); 483 text_box->mFontStyle = LLFontGL::getStyleFromString(font_style);
482 } 484 }
483 485
484 BOOL mouse_opaque; 486 BOOL mouse_opaque = text_box->getMouseOpaque();
485 if (node->getAttributeBOOL("mouse_opaque", mouse_opaque)) 487 if (node->getAttributeBOOL("mouse_opaque", mouse_opaque))
486 { 488 {
487 text_box->setMouseOpaque(mouse_opaque); 489 text_box->setMouseOpaque(mouse_opaque);