00001
00002
00003 #ifndef FONTRENDERER_H
00004 #define FONTRENDERER_H
00005
00006
00007 #include "RenderableObject.h"
00008
00009 #include "Vector2i.h"
00010
00011 #include <string>
00012
00013
00014 namespace pge {
00015
00016
00017 class Texture;
00018
00019
00020 class FontRenderer : public IRenderableObject {
00021
00022
00023 public:
00024
00025
00026
00027
00028
00030 ~FontRenderer(void);
00031
00032
00033
00034
00035
00036
00037
00038 static FontRenderer* getInstance(void);
00039
00040 bool init(void);
00041 void render(void);
00042 void timer(unsigned int delay);
00043
00044 void renderString(std::string str, int size, Vector2i position);
00045 void renderString(std::string str, int size, int x, int y);
00046 void renderChar(char c, int size, int x, int y);
00047
00048
00049 private:
00050
00051
00052
00053
00054
00056 FontRenderer();
00057
00058
00059
00060
00061
00062
00063
00064 Texture *m_fontTexture;
00065 };
00066 };
00067
00068 #endif