Haiku's are pretty,
but sometimes they don't make sense.
Refrigerator.

class Font {
public:
friend class FontManager;
Font() {_size = 30; font=NULL; _text = NULL;}
~Font() { if(font) TTF_CloseFont(font); }
bool Load(int nameId,const string& filename, int size = 0, Uint8 r=255, Uint8 g=255, Uint8 b=255);
void size(int size);
inline int size() {return _size; }
void SetColor(Uint8 red, Uint8 green, Uint8 blue); //probably not the best way to do it...
void Delete();
void SetAlpha(int amount);
void draw(const string& text, int x=0, int y=0, int alpha = 255);
//shouldn't be used
SDL_Surface* GetSurface() { return _text; }
private:
string filename;
int nameId;
int _size;
SDL_Color textColor;
TTF_Font *font;
SDL_Surface* _text;
};
programmerinprogress wrote:Ahh, so you're using TTF then, I'm working on something Bitmap Font-related, and I was actually trying to avoid using TFF, thankyou for your reply though, good luck with the rest of the project.
Users browsing this forum: No registered users and 1 guest