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 Behind Sprite -_-*

Author
Message
kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 23rd May 2009 04:55 Edited at: 23rd May 2009 04:57
When using this code my text appears behind the sprite, i've tried to search around to find a solution but with no luck.

Heres the function which displays the image and sprite:


Here is for the text:


Everything displays all good except the text is behind the image which makes it rather hard to see =P

Any suggestions?

I <3 C++ & Dark GDK 4 2 maek mai gamezorz! =D
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 23rd May 2009 05:07
dbDrawSpritesLast
dbDrawSpritesFirst

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 23rd May 2009 05:26
And now it does not show.. i suspect its being put behind the backdrop or something, but my backdrop is turned off..

I <3 C++ & Dark GDK 4 2 maek mai gamezorz! =D
LP forever
16
Years of Service
User Offline
Joined: 18th Jul 2008
Location:
Posted: 23rd May 2009 07:43
Just use dbPasteSprite()

Don't pushing me away
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 23rd May 2009 11:59
put the dbDrawSpritesFirst before the while gdk part.

Dark Physics makes any hot drink go cold.
kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 23rd May 2009 12:31
When I use dbDrawSpritesFirst(); None of my sprites will drawl, and it is before the GDK loop.

I don't understand how to use dbPasteSprite, there is no variable for me to input which image to use?

I <3 C++ & Dark GDK 4 2 maek mai gamezorz! =D
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 23rd May 2009 12:44
@kklouzal
You create the sprite as usual with 'sprite' specifying the image then, then you hide the sprite, and then you paste it as many times as you want with 'paste sprite'. If you want to change the image you can use 'set sprite image'.

kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 23rd May 2009 13:21
The text is still behind my sprites even with paste and draw first, i'm even pasting before the text is being written.

I <3 C++ & Dark GDK 4 2 maek mai gamezorz! =D
Lazlazlaz 1
19
Years of Service
User Offline
Joined: 18th Sep 2005
Location: England
Posted: 23rd May 2009 15:56
The other option is bitmap fonts, search the forums as there is quite a bit on it around.

DarkGDK is good
kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 24th May 2009 01:28 Edited at: 24th May 2009 02:08
I was only able to find one tutorial and it was for Dark SDK, I need GDK, or is it only avaliable in SDK?

Edit: I was able to take the code and adapt it for GDK, all is well now! =D

I <3 C++ & Dark GDK 4 2 maek mai gamezorz! =D
kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 24th May 2009 03:12 Edited at: 24th May 2009 04:39
EWWW! The text is so pixelated at low sizes >.< like 14px even 16px
-_-*

Edit: I got the normal text to display over the sprites, so no need for the bitmap crap =P

I <3 C++ & Dark GDK 4 2 maek mai gamezorz! =D

Login to post a reply

Server time is: 2024-10-01 01:22:25
Your offset time is: 2024-10-01 01:22:25