| 1 |
|
| 2 |
|
| 3 |
#ifndef FONTS_H |
| 4 |
#define FONTS_H |
| 5 |
|
| 6 |
#include <SDL/SDL.h> |
| 7 |
#include <SDL/SDL_ttf.h> |
| 8 |
#include <iostream> |
| 9 |
|
| 10 |
class Font { |
| 11 |
private: |
| 12 |
TTF_Font* font; |
| 13 |
public: |
| 14 |
Font( char* fileName, int size ); |
| 15 |
|
| 16 |
void render( SDL_Surface* screen, int x, int y, const char* text, Uint8 r, Uint8 g, Uint8 b, Uint8 a = 255 ); |
| 17 |
void renderCenterJustified( SDL_Surface* screen, int x, int y, const char* text, Uint8 r, Uint8 g, Uint8 b, Uint8 a = 255 ); |
| 18 |
void renderRightJustified( SDL_Surface* screen, int x, int y, const char* text, Uint8 r, Uint8 g, Uint8 b, Uint8 a = 255 ); |
| 19 |
|
| 20 |
int getHeight(); |
| 21 |
}; |
| 22 |
|
| 23 |
#endif |