diff options
Diffstat (limited to 'indra/llui/llstyle.cpp')
-rw-r--r-- | indra/llui/llstyle.cpp | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/indra/llui/llstyle.cpp b/indra/llui/llstyle.cpp index 71511f69a4..92c0b7c1b4 100644 --- a/indra/llui/llstyle.cpp +++ b/indra/llui/llstyle.cpp @@ -44,7 +44,10 @@ LLStyle::Params::Params() color("color", LLColor4::black), font("font", LLFontGL::getFontMonospace()), image("image"), - link_href("href") + link_href("href"), + italic("italic", false ), + bold("bold", false), + underline("bold", false) {} @@ -55,7 +58,10 @@ LLStyle::LLStyle(const LLStyle::Params& p) mFont(p.font()), mLink(p.link_href), mDropShadow(p.drop_shadow), - mImagep(p.image()) + mImagep(p.image()), + mItalic(p.italic()), + mBold(p.bold), + mUnderline(p.underline) {} void LLStyle::setFont(const LLFontGL* font) @@ -69,6 +75,25 @@ const LLFontGL* LLStyle::getFont() const return mFont; } +const S32 LLStyle::getFontStyle() const +{ + S32 ret = 0; + if (mBold) + { + ret |= LLFontGL::BOLD; + } + if (mItalic) + { + ret |= LLFontGL::ITALIC; + } + if (mUnderline) + { + ret |= LLFontGL::UNDERLINE; + } + return ret; +} + + void LLStyle::setLinkHREF(const std::string& href) { mLink = href; |