Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

ViPeR007

text...

This topic is 6835 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

you can either use the window's GDI function TextOut or you can write your own text function, which basically would just have an indexed array of all the letters and symbols in some sort of binary format. as for timing how long its shown for, you could have a small struct

struct msg
{
char *text, color;
unsigned short x, y;
unsigned short timeinit, length;
};

for each message on the screen (maybe a global expandable linked list) and each frame you would run through the list of current messages and compare timeinit to timeGetTime(), and if timeGetTime()-timinit > length, you remove that message from the list, otherwise you blit it onto your buffer at (x,y)
hope this helps

Share this post


Link to post
Share on other sites
Advertisement
What would be a good way of displaying text on the screen (in the postition and colour you want) for a certain amount of time?

Example: I want to display "Weapon 1 Selected!!" for 7 seconds in the lower left corner.

Thanx,
ViPeR

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!