thanks :)
Quote:
class BitmapFont
{
private:
SDL_Surface *bitmap;
SDL_Rect chars[ 256 ];
int newLine, space;
public:
BitmapFont();
BitmapFont( SDL_Surface *surface );
void build_font( SDL_Surface *surface );
void show_text( int x, int y, std::string text, SDL_Surface *surface );
//friend class Button;
};
Quote:
class Button : public BitmapFont
{
...
...
}
void Button::OptionClick()
{
bool endOpti = false;
if( quit == false )
{
show_text( 100, 100, "Bitmap Font:\nABDCEFGHIJKLMNOPQRSTUVWXYZ\nabcdefghijklmnopqrstuvwxyz\n0123456789", screen );
apply_surface( 0, 0, optionBG,screen );
//update_screen();
SDL_Flip( screen );
}
both class i use are from SDL tutorial site :).
[Edited by - ShyAngel on December 9, 2010 6:22:27 PM]