Commit ff03f119 authored by petter's avatar petter

changed font name so that we can enjoy anti-aliased numbers

parent e99877d4
......@@ -245,7 +245,7 @@ void Controls::draw(SDL_Surface *screen){
SDL_Surface* times=TTF_RenderText_Solid(Player::font,oss.str().c_str(),white);
#ifdef EMSCRIPTEN
drawScaledText(screen,times,width-64-times->w*2,y+timeLineHeight+8,2);
drawScaledText(screen,times,width-64-times->w*2,y+timeLineHeight+8,1);
#else
redefineRect(&rect,width-64-times->w,y+timeLineHeight+4,times->w+4,times->h+4);
SDL_BlitSurface(times,NULL,screen,&rect);
......@@ -267,7 +267,7 @@ void Controls::draw(SDL_Surface *screen){
TTF_SetFontOutline(Player::font,0);*/
times=TTF_RenderText_Solid(Player::font,oss2.str().c_str(),white);
#ifdef EMSCRIPTEN
drawScaledText(screen,times,max(0,min(width-times->w*2,mouseX-times->w - 2)),y,2);
drawScaledText(screen,times,max(0,min(width-times->w*2,mouseX-times->w - 2)),y,1);
#else
redefineRect(&rect,max(0,min(width-times->w,mouseX-times->w/2 - 2)),y-3,times->w+4,times->h+4);
SDL_BlitSurface(times,NULL,screen,&rect);
......
......@@ -32,7 +32,7 @@ Player::Player(string filename) {
}
#ifdef EMSCRIPTEN
font = TTF_OpenFont("/Assets/arial.ttf",20);
font = TTF_OpenFont("sans-serif",20);
#else
font = TTF_OpenFont("/home/user/NetBeansProjects/TTTPlayer/emBuild//Assets/arial.ttf",20);
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment