diff options
author | Jacek Antonelli | 2008-08-15 23:44:56 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:56 -0500 |
commit | c07901e29ed545bbb02e3bddf148fe1104b94e9f (patch) | |
tree | f1ada64ce834acd7d92a425efb96c4b86bcf16b1 /linden/indra/llui/lltextbox.cpp | |
parent | Second Life viewer sources 1.15.0.2 (diff) | |
download | meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.zip meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.gz meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.bz2 meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.xz |
Second Life viewer sources 1.15.1.3
Diffstat (limited to 'linden/indra/llui/lltextbox.cpp')
-rw-r--r-- | linden/indra/llui/lltextbox.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/linden/indra/llui/lltextbox.cpp b/linden/indra/llui/lltextbox.cpp index 884d638..c4f2cea 100644 --- a/linden/indra/llui/lltextbox.cpp +++ b/linden/indra/llui/lltextbox.cpp | |||
@@ -48,7 +48,7 @@ LLTextBox::LLTextBox(const LLString& name, const LLRect& rect, const LLString& t | |||
48 | mBorderColor( LLUI::sColorsGroup->getColor( "DefaultHighlightLight" ) ), | 48 | mBorderColor( LLUI::sColorsGroup->getColor( "DefaultHighlightLight" ) ), |
49 | mBackgroundVisible( FALSE ), | 49 | mBackgroundVisible( FALSE ), |
50 | mBorderVisible( FALSE ), | 50 | mBorderVisible( FALSE ), |
51 | mDropshadowVisible( TRUE ), | 51 | mFontStyle(LLFontGL::DROP_SHADOW_SOFT), |
52 | mBorderDropShadowVisible( FALSE ), | 52 | mBorderDropShadowVisible( FALSE ), |
53 | mHPad(0), | 53 | mHPad(0), |
54 | mVPad(0), | 54 | mVPad(0), |
@@ -73,7 +73,7 @@ LLTextBox::LLTextBox(const LLString& name, const LLString& text, F32 max_width, | |||
73 | mBorderColor(LLUI::sColorsGroup->getColor("DefaultHighlightLight")), | 73 | mBorderColor(LLUI::sColorsGroup->getColor("DefaultHighlightLight")), |
74 | mBackgroundVisible(FALSE), | 74 | mBackgroundVisible(FALSE), |
75 | mBorderVisible(FALSE), | 75 | mBorderVisible(FALSE), |
76 | mDropshadowVisible(TRUE), | 76 | mFontStyle(LLFontGL::DROP_SHADOW_SOFT), |
77 | mBorderDropShadowVisible(FALSE), | 77 | mBorderDropShadowVisible(FALSE), |
78 | mHPad(0), | 78 | mHPad(0), |
79 | mVPad(0), | 79 | mVPad(0), |
@@ -363,7 +363,7 @@ void LLTextBox::drawText( S32 x, S32 y, const LLColor4& color ) | |||
363 | S32 line_length = *iter; | 363 | S32 line_length = *iter; |
364 | mFontGL->render(mText.getWString(), cur_pos, (F32)x, (F32)y, color, | 364 | mFontGL->render(mText.getWString(), cur_pos, (F32)x, (F32)y, color, |
365 | mHAlign, mVAlign, | 365 | mHAlign, mVAlign, |
366 | mDropshadowVisible ? LLFontGL::DROP_SHADOW : LLFontGL::NORMAL, | 366 | mFontStyle, |
367 | line_length, mRect.getWidth(), NULL, TRUE ); | 367 | line_length, mRect.getWidth(), NULL, TRUE ); |
368 | cur_pos += line_length + 1; | 368 | cur_pos += line_length + 1; |
369 | y -= llfloor(mFontGL->getLineHeight()); | 369 | y -= llfloor(mFontGL->getLineHeight()); |
@@ -373,7 +373,7 @@ void LLTextBox::drawText( S32 x, S32 y, const LLColor4& color ) | |||
373 | { | 373 | { |
374 | mFontGL->render(mText.getWString(), 0, (F32)x, (F32)y, color, | 374 | mFontGL->render(mText.getWString(), 0, (F32)x, (F32)y, color, |
375 | mHAlign, mVAlign, | 375 | mHAlign, mVAlign, |
376 | mDropshadowVisible ? LLFontGL::DROP_SHADOW : LLFontGL::NORMAL, | 376 | mFontStyle, |
377 | S32_MAX, mRect.getWidth(), NULL, TRUE); | 377 | S32_MAX, mRect.getWidth(), NULL, TRUE); |
378 | } | 378 | } |
379 | } | 379 | } |
@@ -406,8 +406,6 @@ LLXMLNodePtr LLTextBox::getXML(bool save_children) const | |||
406 | 406 | ||
407 | node->createChild("border_visible", TRUE)->setBoolValue(mBorderVisible); | 407 | node->createChild("border_visible", TRUE)->setBoolValue(mBorderVisible); |
408 | 408 | ||
409 | node->createChild("drop_shadow_visible", TRUE)->setBoolValue(mDropshadowVisible); | ||
410 | |||
411 | node->createChild("border_drop_shadow_visible", TRUE)->setBoolValue(mBorderDropShadowVisible); | 409 | node->createChild("border_drop_shadow_visible", TRUE)->setBoolValue(mBorderDropShadowVisible); |
412 | 410 | ||
413 | node->createChild("h_pad", TRUE)->setIntValue(mHPad); | 411 | node->createChild("h_pad", TRUE)->setIntValue(mHPad); |
@@ -447,6 +445,12 @@ LLView* LLTextBox::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *f | |||
447 | 445 | ||
448 | text_box->initFromXML(node, parent); | 446 | text_box->initFromXML(node, parent); |
449 | 447 | ||
448 | LLString font_style; | ||
449 | if (node->getAttributeString("font-style", font_style)) | ||
450 | { | ||
451 | text_box->mFontStyle = LLFontGL::getStyleFromString(font_style); | ||
452 | } | ||
453 | |||
450 | if(node->hasAttribute("text_color")) | 454 | if(node->hasAttribute("text_color")) |
451 | { | 455 | { |
452 | LLColor4 color; | 456 | LLColor4 color; |