Jump to content
  • Advertisement
Sign in to follow this  
dpadam450

print variables with drawtext

This topic is 4452 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
If you notice, the basic text-drawing functions involve strings, which are text.
Convert your variables to strings in order to draw them.
[If that isn't the answer, then please elaborate]

Share this post


Link to post
Share on other sites
Include the windows header file into your app and use wsprintf like this:

int score = 8;
char text[32];
wsprintf(text,"The Score Is %d",score);

Then when your printing the text using DrawText() put text as the first parameter.

Hope that helped and good luck.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!