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.

DarkBASIC Discussion / Text > sprites ... meh

Author
Message
Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 17th Jul 2005 21:12
Before anyone says anything..yes I have checked the forums.

I need help to make text appear over a sprite, and I just do not want to make an image for every single piece of text... any ideas? thanks

Your signature has been erased by a mod because it's larger than 600x120...
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 17th Jul 2005 21:41 Edited at: 17th Jul 2005 21:42
Without making an image for every text I don't see how you can do it. Text always writes to the background... sprites are always on top of the background. Any text writing on top of a sprite goes right through it to the background.

What text are you trying to write on a sprite? Post some code and i'm sure somebody can find a better way to do it for you (i'll try my best too).

I'm going to do a few experiments and see if I can get it... but don't hold your breath.
Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 17th Jul 2005 21:48
well, im trying to make a button, the only code you really need is



Your signature has been erased by a mod because it's larger than 600x120...
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 17th Jul 2005 22:08
Here's a link to a message on the forums:

http://forum.thegamecreators.com/?m=forum_view&t=44319&b=4



When I was experimenting it works great if the sprite is holding still and doesn't change images (like in sprite animations). The sprites will still overwrite text if the sprite is moving or cycling through more than one image. :-(
Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 17th Jul 2005 22:16
oh man, i think this is DBPro code, it doesnt work for me

Your signature has been erased by a mod because it's larger than 600x120...
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 17th Jul 2005 22:21
Or, you can use images instead of sprites. cls will keep clearing the screen, and you paste the image beneath the text

Immunity and Annihalation makes Immunihalation...
Robot
20
Years of Service
User Offline
Joined: 27th May 2004
Location:
Posted: 18th Jul 2005 02:25
hide the sprite and then paste sprite. text can go over a pasted sprite.

The happenings of tommorow are behind us now
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 18th Jul 2005 03:57
Oops.

I forgot where I was at. Yeah the lock/unlock pixels command isn't in Darkbasic Classic. Sven B and Robot are right you should just go with pasting your sprite to the screen, hide the sprite, then write the text.

Don't worry this works in Classic.
Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 18th Jul 2005 04:03
yeah, i tried robots idea, it works great, thanks robot

Your signature has been erased by a mod because it's larger than 600x120...

Login to post a reply

Server time is: 2025-05-22 19:22:14
Your offset time is: 2025-05-22 19:22:14