summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorrichard <none@none>2009-12-15 19:33:18 -0800
committerrichard <none@none>2009-12-15 19:33:18 -0800
commit3a02b9ec882c98009ae6c24913ee8a7a620b0f87 (patch)
tree51c3bccd75e8daf7bd10c31ee6fddbc0c823a092 /indra/llrender
parentcda1598fd6e17e0c0b641c73c540d8c898f2798f (diff)
added setBlockFromValue so setting a LLRect param in code will set the individual left, right, top, bottom values, for example
don't call setupParams when creating widgets from code moved Multiple param constraints into BaseBlock to remove extra scoping
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llfontgl.cpp23
-rw-r--r--indra/llrender/llfontgl.h1
2 files changed, 24 insertions, 0 deletions
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index db1f019a81..7ad5f9608f 100644
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
@@ -761,6 +761,29 @@ U8 LLFontGL::getStyleFromString(const std::string &style)
}
// static
+std::string LLFontGL::getStringFromStyle(U8 style)
+{
+ std::string style_string;
+ if (style & NORMAL)
+ {
+ style_string += "|NORMAL";
+ }
+ if (style & BOLD)
+ {
+ style_string += "|BOLD";
+ }
+ if (style & ITALIC)
+ {
+ style_string += "|ITALIC";
+ }
+ if (style & UNDERLINE)
+ {
+ style_string += "|UNDERLINE";
+ }
+ return style_string;
+}
+
+// static
std::string LLFontGL::nameFromFont(const LLFontGL* fontp)
{
return fontp->mFontDescriptor.getName();
diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h
index bb7d8524e7..ea8eee7690 100644
--- a/indra/llrender/llfontgl.h
+++ b/indra/llrender/llfontgl.h
@@ -144,6 +144,7 @@ public:
// Takes a string with potentially several flags, i.e. "NORMAL|BOLD|ITALIC"
static U8 getStyleFromString(const std::string &style);
+ static std::string getStringFromStyle(U8 style);
static std::string nameFromFont(const LLFontGL* fontp);
static std::string sizeFromFont(const LLFontGL* fontp);