I have a little application which uses SDL_ttf to display text. This works just fine via: TTF_RenderText_Solid( font, "text here", textColor ); However, I was wondering how I would go about rendering integers. I am assuming they would need to be casted to strings first, but I am running into a problem with this. Specifically when I want to display the x and y position of the mouse like such:
if( event.type == SDL_MOUSEMOTION )
{
mouse_move = TTF_RenderText_Solid( font, "need mouse x and y here", textColor );
}
I believe I can grab the x and y coordinates via event.motion.x and event.motion.y. Is this correct?
1 Answer