Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 15th, 2012  |  syntax: None  |  size: 0.25 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to draw solid text using sdl_ttf?
  2. SDL_Color textcol = {255, 255, 255};
  3. SDL_Color backtextcol = {0, 0, 0};
  4. SDL_Surface *mes = TTF_RenderText_Shaded(font, "The game has begun", textcol, backtextcol);
  5. apply_surface(40, 40, mes, screen);
  6. SDL_Flip(screen);