Text with D3D

Started by
2 comments, last by -justin- 18 years, 10 months ago
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
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'.
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.
Projects:> Thacmus - CMS (PHP 5, MySQL)Paused:> dgi> MegaMan X Crossfire
thanks everyone i got it to work out... now just one more question and i'll be done :)

This topic is closed to new replies.

Advertisement