Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / A little help please

Author
Message
EightYearRecoil
21
Years of Service
User Offline
Joined: 7th Apr 2003
Location: United States
Posted: 20th Apr 2003 11:17
Hey, I am building a 2d engine for an adventure game. I would like to make it so when the user presses a key, a box appears in the center of the screen that you can type into. I made the box as a sprite so it will not stay on the screen after enter is pressed, but the text will not appear over the sprite. Is there anyway to have text over a sprite, or should I just look into other ways of doing it? Thanks in advance.

Eight Year Recoil
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 20th Apr 2003 13:27
No, you can't display text over the top of a sprite.

Do something like this instead -

Grab a copy of the area you want your box to appear over (so you can paste it back later), then draw your box. Then you can display text into your box as the user types using the text command. When the enter key is pressed, paste your saved image back.
EightYearRecoil
21
Years of Service
User Offline
Joined: 7th Apr 2003
Location: United States
Posted: 20th Apr 2003 13:49
Thanks. I was really hoping I could do it with a sprite, but from the commands in the book I didn't think it would be possible. I have an idea of what I can do almost exactly what you said (I was just hoping to make it simpler). Anyway, thank you for the quick reply. I greatly appreciate it. And it helps alot (I now know not to bother with sprites for this).

Thanks
Eight Year Recoil

Login to post a reply

Server time is: 2024-04-25 06:59:57
Your offset time is: 2024-04-25 06:59:57