home *** CD-ROM | disk | FTP | other *** search
- #ifndef FONTOBJECT2D_H
- #define FONTOBJECT2D_H
-
- #include "Object2D.h"
- #include "String.h"
- class Sequences;
- class Scene2D;
-
- #include <map>
-
- class FontObject2D : public Object2D
- {
- public:
- FontObject2D(Scene2D * scene, int layer, const String & name);
- virtual ~FontObject2D();
-
- virtual void render();
-
- void set_transparency(unsigned alpha);
- void change_text(const String & text);
- private:
- struct SeqFr
- {
- unsigned seq;
- unsigned fr;
- SeqFr()
- : seq( 0 ),
- fr( 0 )
- {}
- SeqFr( unsigned seq, unsigned fr )
- : seq( seq ),
- fr( fr )
- {}
- };
- typedef std::map<wchar_t, SeqFr> FontTable;
- FontTable font_table;
- String text;
- unsigned alpha;
- const Sequences * sequences;
- };
- #endif //FONTOBJECT2D_H