00001 #ifndef __FONT_H 00002 #define __FONT_H 00003 00004 #include <SDL/SDL.h> 00005 #include "bfont.h" 00006 00007 #define FONT_MENU_HIGHLIGHTED 1 00008 #define FONT_MENU_UNHIGHLIGHTED 2 00009 #define FONT_WHITE_TEXT 3 00010 #define FONT_COLOURED_TEXT 4 00011 #define FONT_HELP_FONT 5 00012 00013 class FontHandler 00014 { 00015 public: 00016 static bool init(); 00017 static void cleanUp(); 00018 00019 static int TextWidth( int font, const char *text ); 00020 static int FontHeight( int font ); 00021 static void draw( SDL_Surface *screen, int font, const char *text, int x, int y ); 00022 static void changeColor( int font, int r, int g, int b ); 00023 00024 static BFont *getFont( int font ); 00025 private: 00026 static BFont *menuSelFont; 00027 static BFont *menuUnSelFont; 00028 static BFont *whiteFont; 00029 static BFont *colouredFont; 00030 static BFont *helpFont; 00031 }; 00032 00033 #endif
1.4.2