[SDL] Inputting integers...

Started by
12 comments, last by nooblet 15 years, 6 months ago
Quote:Original post by nooblet
But how am I supposed to do that?
You already know how to render text, since you are doing it in load_files(). Try this every frame after you update the stringstreams:
SDL_FreeSurface(player_text);player_text = TTF_RenderText_Solid(font, stream.str().c_str(), textColor);

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Advertisement
How do I check to see after every frame? Would I have to use a timer?
Quote:Original post by nooblet
How do I check to see after every frame? Would I have to use a timer?
Every time you update the stringstreams, you also re-render their respective images. That seems to be near the top of your handle_input() function.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

EDIT: Solved the problem :)

[Edited by - nooblet on October 12, 2008 1:06:12 AM]

This topic is closed to new replies.

Advertisement