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 / Ingame menu

Author
Message
jgg8588
15
Years of Service
User Offline
Joined: 31st Mar 2009
Location:
Posted: 10th Apr 2009 06:32
Hey guys,
I am having a little trouble creating a menu in-game. Basically I'm trying to create an RPG and i want a menu to pop up when a certain button is pressed displaying things such as "status", "equipment", etc. My problem lies in an issue loading an image or sprite on top of the 3D game. No image has loaded and only one sprite has loaded and that sprite covers the text that i want to display on top(the status, equipment, etc)
Is there something I'm missing? Any help would be very much appreciated.
Thanks for your time,
Jordan
go2none
15
Years of Service
User Offline
Joined: 8th Oct 2008
Location: London
Posted: 10th Apr 2009 14:13
I find it easier (and prettier, too) to create sprites with captions instead of drawing text on them using dbText (that's what you're doing at the moment, right?). You can then fiddle with dbSetSpritePriority to draw them in the order you want or just hide/show them.

Quote: "No image has loaded and only one sprite has loaded and that sprite (...)"


You would have to post some code first to help us help you.
ABXG
15
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Canada
Posted: 10th Apr 2009 14:16
Use dbDrawSpritesLast(); at the beginning of your game (I don't think it needs to be called every time through your loop).

Next, render your text after your sprites, example:



I suggest getting this addon for text:


Once I got it figured out it made it much easier to do text. You still need to make sure that you write your text after you draw your sprites.

------------------------------------
Currently 900+ lines of code into an "over-the-shoulder" action RPG with combat based on rag-doll physics.
jgg8588
15
Years of Service
User Offline
Joined: 31st Mar 2009
Location:
Posted: 16th Apr 2009 07:57
Thank you for the responses! I appreciate how quickly you responded and apologize for taking so long to respond to your responses.

go2none: The dbSetSpritePriority was something really useful that I had not used until you mentioned. It's working well. Thanks! When you say sprites with captions do you mean create an image of the text?

ABXG: The drawing text on top of my sprites isn't working.
and for the addon, do i just copy that code into a file?
i haven't post code before but hopefully i'm doing this right. lol. Here's part of the code i used where the text isn't showing up.

Login to post a reply

Server time is: 2024-09-30 23:27:32
Your offset time is: 2024-09-30 23:27:32