00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef VIDEO_FONTS_H_
00010 #define VIDEO_FONTS_H_
00011
00012
00013 #define TEXT_NONE 0
00014 #define TEXT_BLENDED 1
00015 #define TEXT_SHADED 2
00016
00017 #include "../ngt.h"
00018 #include <string>
00019
00020 using namespace std;
00021
00023
00026 class NGT_Font{
00027 public:
00029 string filename;
00031 int size;
00033
00039 int mode;
00041 int x;
00043 int y;
00045 SDL_Color color;
00047 void draw(string text, SDL_Surface *screen, int draw_x, int draw_y);
00049 void draw(string text, SDL_Surface *scr);
00051 void free() { TTF_CloseFont(font); };
00052
00053 NGT_Font() {};
00055 NGT_Font(string filename, int size);
00057 int LoadTTF(string filename, int size);
00059 int LoadTTF();
00060 private:
00062 TTF_Font *font;
00063 };
00064
00065 #endif