Skip to main content
GameDev.net gamedev.net
🔒 Locked

MessageBox

Started by stenny Aug 9, 2007 at 4:19 PM 1 replies 1k views
Original Post
stenny
stenny
Heya guys! I'm creating a messagebox like used in all RPGs. Because of the fact it's gonna be having quite nice graphics, I though of using a sprite and stretching it depending on the width and height of the messagebox. I'm using a ID3DXSprite interface with it's scale matrix. But if I stretch my 1px-in-width sprite to, e.g. a width of 640, it doesn't start at 0 and cuts off nicely after 640 pixels, no, it slowly blends away until it arrives at pixel 640. I guess it has something to do with blending modes or such, but I can't seem to find the solution. Any ideas? Much appreciated, -Stijn :D
What do I expect? A young man's quest to defeat an evil sorceror while discovering the truth of his origins. A plucky youngster attended by her brutish guardian. A powerful artifact which has been broken into a small number of artifactlets distributed around the world.What do I want? Fewer damn cliches. - Sneftel
galapogos22
galapogos22
If i understood that right you are stretching a sprite of width 1 to 640. Width 1? Does this mean you want a uniform colour for your text box? If so i would draw a rectangle and fill it a single colour with the Clear() function you use to clear the viewport, but give it the said rectangle and the colour wanted. It esentially clears that rectangle to that colour to you can draw/write whatever on top.

As for the problem of it fading into nothingness i don't know i am afraid. If no one else give satisfactoy answer wack up the code so we can take a peek.
'I is what I is. Eggegegegegeg' - The wisdom of Popeye
stenny
stenny
Actually, the height can still be larger than 1.
What do I expect? A young man's quest to defeat an evil sorceror while discovering the truth of his origins. A plucky youngster attended by her brutish guardian. A powerful artifact which has been broken into a small number of artifactlets distributed around the world.What do I want? Fewer damn cliches. - Sneftel

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.