Jump to content
  • Advertisement
Sign in to follow this  
-justin-

Text with D3D

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

Ok I'm not sure how to explain this, but here goes... Is there anyway I can make a thing that takes the text I input... then it slides through it... If I had the text: Hello... I want it to do the following Output maybe half of H... then the other half, then half of the e, then the other half, all smoothly; so that in a few seconds Hello would come up.. I'm not sure if I explained this correctly (I thought about using images, but the number of images would be INSANE) thanx

Share this post


Link to post
Share on other sites
Advertisement
I've never done this before, but here's my idea. On your screen where you are getting the input, you have a long black (or whatever color the background is) rectangle that is positioned over the text that you have. What you then do is have it just literally slide to the right, giving the effect that you have described. If you think about it, it *should* work out just fine [smile] All you have to do is work with the timing so that it looks smoothly. Since the text is always being drawn, you will have to make sure you draw the text first, then draw the rectangle over it, then when you move the rectangle, the text is 'uncovered'.

Share this post


Link to post
Share on other sites
Try using ID3DXFont to draw your text, and in ID3DXFont::DrawText(), use the pRect argument, and the default flags (left alignment with clipping) ought to do the trick.
EDIT: If you need to get the width or height, look into the DT_CALCRECT flag.

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.

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!