summaryrefslogtreecommitdiff
path: root/indra/newview/llhudtext.h
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-02-25 17:06:17 -0800
committerJames Cook <james@lindenlab.com>2010-02-25 17:06:17 -0800
commit36c35bca2663447216027015c10aa921ab75abfb (patch)
treec716404bf813a4635fef60a7419a3961c6de10b4 /indra/newview/llhudtext.h
parent3eec41f6716940ffcfd4bf239e1e493c2d0a0658 (diff)
Support multiple fonts, colors and styles in name tags
Simplified LLHUDText string API to be UTF8 only Added per-text segment font support Changed LLVOAvatar invalidateNameTag to clearNameTag
Diffstat (limited to 'indra/newview/llhudtext.h')
-rw-r--r--indra/newview/llhudtext.h29
1 files changed, 18 insertions, 11 deletions
diff --git a/indra/newview/llhudtext.h b/indra/newview/llhudtext.h
index 5d88b5d6ab..f7248ceffc 100644
--- a/indra/newview/llhudtext.h
+++ b/indra/newview/llhudtext.h
@@ -34,7 +34,7 @@
#define LL_LLHUDTEXT_H
#include "llpointer.h"
-#include "lldarrayptr.h"
+//#include "lldarrayptr.h"
#include "llhudobject.h"
#include "v4color.h"
@@ -45,7 +45,7 @@
#include "llfontgl.h"
#include <set>
#include <vector>
-#include "lldarray.h"
+//#include "lldarray.h"
// Renders a 2D text billboard floating at the location specified.
class LLDrawable;
@@ -62,14 +62,19 @@ protected:
class LLHUDTextSegment
{
public:
- LLHUDTextSegment(const LLWString& text, const LLFontGL::StyleFlags style, const LLColor4& color)
- : mColor(color), mStyle(style), mText(text) {}
+ LLHUDTextSegment(const LLWString& text, const LLFontGL::StyleFlags style, const LLColor4& color, const LLFontGL* font)
+ : mColor(color),
+ mStyle(style),
+ mText(text),
+ mFont(font)
+ {}
F32 getWidth(const LLFontGL* font);
- const LLWString& getText() const { return mText; };
+ const LLWString& getText() const { return mText; }
void clearFontWidthMap() { mFontWidthMap.clear(); }
LLColor4 mColor;
LLFontGL::StyleFlags mStyle;
+ const LLFontGL* mFont;
private:
LLWString mText;
std::map<const LLFontGL*, F32> mFontWidthMap;
@@ -89,16 +94,18 @@ public:
} EVertAlignment;
public:
- void setStringUTF8(const std::string &utf8string);
- void setString(const LLWString &wstring);
+ void setString(const std::string& text_utf8);
+// void setString(const LLWString &wstring);
void clearString();
- void addLine(const std::string &text, const LLColor4& color, const LLFontGL::StyleFlags style = LLFontGL::NORMAL);
- void addLine(const LLWString &wtext, const LLColor4& color, const LLFontGL::StyleFlags style = LLFontGL::NORMAL);
- void setLabel(const std::string &label);
- void setLabel(const LLWString &label);
+ void addLine(const std::string &text_utf8, const LLColor4& color, const LLFontGL::StyleFlags style = LLFontGL::NORMAL, const LLFontGL* font = NULL);
+// void addLine(const LLWString &wtext, const LLColor4& color, const LLFontGL::StyleFlags style = LLFontGL::NORMAL, const LLFontGL* font = NULL);
+ void setLabel(const std::string& label_utf8);
+// void setLabel(const LLWString &label);
+ void addLabel(const std::string& label_utf8);
void setDropShadow(const BOOL do_shadow);
void setFont(const LLFontGL* font);
void setColor(const LLColor4 &color);
+ void setAlpha(F32 alpha);
void setZCompare(const BOOL zcompare);
void setDoFade(const BOOL do_fade);
void setVisibleOffScreen(BOOL visible) { mVisibleOffScreen = visible; }