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
00026 class TextBillboardComponent : public BillboardComponent
00027 {
00028 public:
00029
00030
00032 TextBillboardComponent(Entity *parent);
00041 TextBillboardComponent(Entity *parent, const std::string &fontFileName, const wchar_t *text,
00042 const dimension2df &size = dimension2df(10.0f, 10.0f),
00043 const SColor &colorTop = SColor(255, 255, 255, 255),
00044 const SColor &colorBottom = SColor(255, 255, 255, 255));
00052 TextBillboardComponent(Entity *parent, const std::string &fontFileName, const std::string &text,
00053 const dimension2df &size = dimension2df(10.0f, 10.0f),
00054 const SColor &colorTop = SColor(255, 255, 255, 255),
00055 const SColor &colorBottom = SColor(255, 255, 255, 255));
00057 ~TextBillboardComponent();
00058
00059
00062 static TextBillboardComponent* refFactory(Entity *parent);
00065 static TextBillboardComponent* refFactory(Entity *parent, const std::string &fontFileName,
00066 const std::string &text, const dimension2df &size,
00067 const SColor &colorTop, const SColor &colorBottom);
00068
00069
00072 IBillboardTextSceneNode* getBillboardTextSceneNode();
00073
00076 void setText(const std::string &text);
00080 void setText(const wchar_t *text);
00083 void setTextColor(const SColor &color);
00084
00085 private:
00086
00087
00088 IBillboardTextSceneNode *mBillboardTextSN;
00089 };
00090
00091
00092
00094 extern void bindTextBillboardComponent(asIScriptEngine *engine);
00095
00096 #endif