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 / Render text over sprites?

Author
Message
CallumD
13
Years of Service
User Offline
Joined: 30th Mar 2011
Location: United Kingdom
Posted: 4th Nov 2011 23:40
Hi,

I'm new to Dark GDK development, and I am trying to render a main menu. I want to use text and an image (I guess a sprite would be the best option?). My question is; how do I render the text on top of the sprite?

Thanks,
Callum
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 5th Nov 2011 07:03
I had the same issue once. The key is to use dbPasteSprite(..) and then do the text. You have to dbHideSprite(..) for each of the sprites you would like to have text over and in your loop, use the method I mentioned above. Do a global search using "text over sprite" and you will find plenty of examples.

The fastest code is the code never written.
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 5th Nov 2011 10:56 Edited at: 5th Nov 2011 10:56
and if you need to use multiple fonts and colors, default won't be the choice for you, either try Cloggy's D3D, or check this out

Login to post a reply

Server time is: 2024-11-19 06:50:49
Your offset time is: 2024-11-19 06:50:49