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 to be in front of the images and change size of my text.

Author
Message
Alahadi
14
Years of Service
User Offline
Joined: 24th Dec 2009
Location: Sweden
Posted: 8th Feb 2010 16:42
My code:


The text hides behind the image!

And how do I change the text size?

I tried with this:


Error:
error C2660: 'dbTextSize' : function does not take 1 arguments
Alahadi
14
Years of Service
User Offline
Joined: 24th Dec 2009
Location: Sweden
Posted: 8th Feb 2010 17:21
Well.. I solved that change size of text but I still need help to make the images to be behind my text!
Marsh0
15
Years of Service
User Offline
Joined: 18th Mar 2009
Location:
Posted: 8th Feb 2010 17:24
I do not have a copy of Dark GDK installed right now so i cant find the command or give you the relevant code.

But i believe you have to call a command called dbDrawSpritesLast or something close to that. Search the command list.

www.touchofdeathproductions.com
Isocadia
15
Years of Service
User Offline
Joined: 24th Jul 2009
Location:
Posted: 8th Feb 2010 17:29 Edited at: 8th Feb 2010 17:31
No the way you do it, it renders the text, and the the sprite on top of it, since it is called last, put the dbText command after the dbPlay sprite in your while loop, that should do it.

Isocadia

edit: And for the dbTextSize, it returns the size of the tekst, use dbSetTextSize ( int iSize ) to change the size.

Alahadi
14
Years of Service
User Offline
Joined: 24th Dec 2009
Location: Sweden
Posted: 8th Feb 2010 17:50
@Isocadia

The dbPlay sprite does nothing becouse it has no sprite to play.

Also tried to add the text after it in the while loop and it did not work at all..

SO HOW CAN THIS BE SOLVED?
Marsh0
15
Years of Service
User Offline
Joined: 18th Mar 2009
Location:
Posted: 8th Feb 2010 18:00
That was the way i got it to work Isocadia as far as i can recall. It may have been dbDrawSpritesFirst though.

www.touchofdeathproductions.com
Amnzero
15
Years of Service
User Offline
Joined: 1st Aug 2009
Location:
Posted: 9th Feb 2010 04:42
dbDrawSpritesFirst, will cause sprites to be drawn before 3D is rendered. I don't know if it has an effect with other 2D stuff, like text. Its worth a shot though.

if(enemy == Amnzero) runAway();
Amnzero->WebSite = L"http://neovance.com/";
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 9th Feb 2010 08:23 Edited at: 9th Feb 2010 08:23
oo yeah, that was dbdrawspritesfirst's problem with 3d stuff, so better paste the sprites before using dbText():


oh and, if you wont use any 3d objects, you can use dbDrawSpritesFirst

Aldur
17
Years of Service
User Offline
Joined: 8th Oct 2007
Location: Melbourne, Australia
Posted: 9th Feb 2010 08:49
Yes, Hassan is right.
By pasting the sprites you can control their draw priority.

Make sure when you define your sprite, you hide it though.
Paste the sprite in the game loop and then follow up with text.

Alahadi
14
Years of Service
User Offline
Joined: 24th Dec 2009
Location: Sweden
Posted: 11th Feb 2010 17:28
@Hassan

dbDrawSpritesFirst does not work :/ Still can't get the text to be in fron om my immages.. dbDrawSpritesFirst makes it all just black than crashes.
Alahadi
14
Years of Service
User Offline
Joined: 24th Dec 2009
Location: Sweden
Posted: 11th Feb 2010 20:07


This is how I coded it still this text "Hello" are behind the images..
Alahadi
14
Years of Service
User Offline
Joined: 24th Dec 2009
Location: Sweden
Posted: 11th Feb 2010 22:52
I got it working now! All you need is the dbDrawSpritesFirst and put the dbText in the while loop!

Login to post a reply

Server time is: 2024-11-20 05:41:37
Your offset time is: 2024-11-20 05:41:37