00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef __TEXTBILLBOARDCOMPONENT_H__
00017 #define __TEXTBILLBOARDCOMPONENT_H__
00018
00019
00020 #include "../../dependencies.h"
00021 #include "BillboardComponent.h"
00022
00023
00024
00033 class TextBillboardComponent : public BillboardComponent
00034 {
00035 public:
00036
00037
00039 TextBillboardComponent(Entity *parent);
00048 TextBillboardComponent(Entity *parent, const std::string &fontFileName, const wchar_t *text,
00049 const dimension2df &size = dimension2df(10.0f, 10.0f),
00050 const SColor &colorTop = SColor(255, 255, 255, 255),
00051 const SColor &colorBottom = SColor(255, 255, 255, 255));
00059 TextBillboardComponent(Entity *parent, const std::string &fontFileName, const std::string &text,
00060 const dimension2df &size = dimension2df(10.0f, 10.0f),
00061 const SColor &colorTop = SColor(255, 255, 255, 255),
00062 const SColor &colorBottom = SColor(255, 255, 255, 255));
00064 ~TextBillboardComponent();
00065
00066
00069 IBillboardTextSceneNode* getBillboardTextSceneNode();
00070
00079 void setText(const std::string &text);
00083 void setText(const wchar_t *text);
00092 void setTextColor(const SColor &color);
00093
00094
00097 static bool parseXML(IXMLReader *file, Entity *entity);
00098
00099 private:
00100
00101
00102 void init(IGUIFont *font, const wchar_t *text, const dimension2df &size, const SColor &colorTop,
00103 const SColor &colorBottom);
00104
00105
00106 IBillboardTextSceneNode *mBillboardTextSN;
00107 };
00108
00109 #endif