diff options
author | Don Kjer <don@lindenlab.com> | 2007-05-04 21:57:06 +0000 |
---|---|---|
committer | Don Kjer <don@lindenlab.com> | 2007-05-04 21:57:06 +0000 |
commit | 70aaa3e444cf9cb067addcbdde237762bd62fcf4 (patch) | |
tree | 4013659d2335c4681b8c93ea795cf8ccb8aa55cd /indra/llui/lltextbox.cpp | |
parent | 08d746156b56d8b72919af8cbca25609c855ef82 (diff) |
svn merge -r 61148:61343 svn+ssh://svn/svn/linden/branches/maintenance into release
Diffstat (limited to 'indra/llui/lltextbox.cpp')
-rw-r--r-- | indra/llui/lltextbox.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/indra/llui/lltextbox.cpp b/indra/llui/lltextbox.cpp index 2afa32eccd..48ff6afbd5 100644 --- a/indra/llui/lltextbox.cpp +++ b/indra/llui/lltextbox.cpp @@ -28,7 +28,7 @@ LLTextBox::LLTextBox(const LLString& name, const LLRect& rect, const LLString& t mBorderColor( LLUI::sColorsGroup->getColor( "DefaultHighlightLight" ) ), mBackgroundVisible( FALSE ), mBorderVisible( FALSE ), - mDropshadowVisible( TRUE ), + mFontStyle(LLFontGL::DROP_SHADOW_SOFT), mBorderDropShadowVisible( FALSE ), mHPad(0), mVPad(0), @@ -53,7 +53,7 @@ LLTextBox::LLTextBox(const LLString& name, const LLString& text, F32 max_width, mBorderColor(LLUI::sColorsGroup->getColor("DefaultHighlightLight")), mBackgroundVisible(FALSE), mBorderVisible(FALSE), - mDropshadowVisible(TRUE), + mFontStyle(LLFontGL::DROP_SHADOW_SOFT), mBorderDropShadowVisible(FALSE), mHPad(0), mVPad(0), @@ -343,7 +343,7 @@ void LLTextBox::drawText( S32 x, S32 y, const LLColor4& color ) S32 line_length = *iter; mFontGL->render(mText.getWString(), cur_pos, (F32)x, (F32)y, color, mHAlign, mVAlign, - mDropshadowVisible ? LLFontGL::DROP_SHADOW : LLFontGL::NORMAL, + mFontStyle, line_length, mRect.getWidth(), NULL, TRUE ); cur_pos += line_length + 1; y -= llfloor(mFontGL->getLineHeight()); @@ -353,7 +353,7 @@ void LLTextBox::drawText( S32 x, S32 y, const LLColor4& color ) { mFontGL->render(mText.getWString(), 0, (F32)x, (F32)y, color, mHAlign, mVAlign, - mDropshadowVisible ? LLFontGL::DROP_SHADOW : LLFontGL::NORMAL, + mFontStyle, S32_MAX, mRect.getWidth(), NULL, TRUE); } } @@ -386,8 +386,6 @@ LLXMLNodePtr LLTextBox::getXML(bool save_children) const node->createChild("border_visible", TRUE)->setBoolValue(mBorderVisible); - node->createChild("drop_shadow_visible", TRUE)->setBoolValue(mDropshadowVisible); - node->createChild("border_drop_shadow_visible", TRUE)->setBoolValue(mBorderDropShadowVisible); node->createChild("h_pad", TRUE)->setIntValue(mHPad); @@ -427,6 +425,12 @@ LLView* LLTextBox::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *f text_box->initFromXML(node, parent); + LLString font_style; + if (node->getAttributeString("font-style", font_style)) + { + text_box->mFontStyle = LLFontGL::getStyleFromString(font_style); + } + if(node->hasAttribute("text_color")) { LLColor4 color; |