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.

Dark GDK / Text over Sprite

Author
Message
Timatron
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 23rd Dec 2009 03:04
Hey, I've been having his problem for a couple of days now and I can't seem to figure it out. In my game when the player loses the game I have a sprite come up to say "You lost, you killed ___ Zombies!", but the sprite covers the text variable that would be in the blank spot. I've looked around the forum and all I can find is to use a plane and attach the texture, except I just cannot center it right on the screen no matter how hard I try. Is there an easier way? Thanks

-Tim
puppyofkosh
17
Years of Service
User Offline
Joined: 9th Jan 2007
Location:
Posted: 23rd Dec 2009 03:49
Try dbDrawSpritesFirst();
Timatron
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 23rd Dec 2009 04:03
Thanks for the help, all that did was make some of my sprites disappear.
puppyofkosh
17
Years of Service
User Offline
Joined: 9th Jan 2007
Location:
Posted: 27th Dec 2009 14:54
Instead of putting a sprite over text, I guess you could try adding a bunch of strings together like this? I'm not sure this would even work, I didn't compile it.

Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 27th Dec 2009 15:10
maybe this is what you are looking for?


also, note that is not the 100% safe way, im not sure of the safe way anyway, but this code works, if im understanding what you desire

Serial Velocity
16
Years of Service
User Offline
Joined: 24th Aug 2008
Location:
Posted: 27th Dec 2009 17:24 Edited at: 27th Dec 2009 17:25
The safest way is to use sprintf_s:



ErDa
16
Years of Service
User Offline
Joined: 17th Feb 2008
Location:
Posted: 27th Dec 2009 18:34
Use this to create an image out of text input

Timatron
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 27th Dec 2009 22:31
Thanks for all the help guys! I ended up just making the sprite off screen and then pasting it on and it put the text in front. I'm sure there's better ways but it works fine. All the help is greatly appreciated!

-Tim

Login to post a reply

Server time is: 2024-11-20 07:34:37
Your offset time is: 2024-11-20 07:34:37