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 / How do i make a game menu using images?

Author
Message
bkinsman
17
Years of Service
User Offline
Joined: 30th Jan 2007
Location:
Posted: 12th Jan 2009 12:43
Ok i know this is probably a really silly question but i am new to scripting so please bare with me.

How do i make a menu using images?
I thought just to make the background it would be simple by just calling dbLoadImage ("Background.bmp", 1);

but obviously it doesn't work and i don't know how to just simply call this to view on screen. On top of that then i will want to load images on top i.e. the New Game, Load Game, Options and Exit Buttons.

All help will be much appreciated.

BJKDAW
Chamill
16
Years of Service
User Offline
Joined: 29th Sep 2008
Location:
Posted: 12th Jan 2009 13:08
Well .. I'd do like this;

Use an image just as you said in your post .. but maybe use dbSprite instead of LoadImage .. Wich would make the picture always be above all the others.
And then you can create all of your "button"-pictures over it, you might want to create 2 pictures for each .. One for the common button and one for when you highlight it .. And then you can play a little bit with the dbSetSpritePriority to make the Sprites show in the desired order.

I've never scripted myself tho' wich means maybe I'm not that helpfull, but that's how I'd do it

And btw, the thing here is that Dark GDK works really fast with sprites wich is why I would say this is a smart idea =)

Chamillion

You can only get smarter by facing a smarter opponent.
Yoda Master
16
Years of Service
User Offline
Joined: 23rd Feb 2008
Location: Genova
Posted: 12th Jan 2009 13:55
After you have loaded the image you should call dbPasteImage function in order to see your bitmap painted to the screen!

Fear leads to anger
Anger leads to hate
Hate leads to suffering
bkinsman
17
Years of Service
User Offline
Joined: 30th Jan 2007
Location:
Posted: 12th Jan 2009 15:29 Edited at: 12th Jan 2009 15:38
Oh fantastic thank you to both of you, i was hoping to just use images but i can see the theory in the sprites idea, so i think i will go for that now. Thanks.

Thank you yoda master, i tried it and it works, now i just got to resize the image to fit the screen i just made up a test image with writing on and some of the writing appears off the screen, (this happens in maximized mode as well)

By the way just to let you know it is the main menu i am trying to create and not an in-game menu....yet. Thanks again.

Edit: I found that i needed to set the display mode to be able to view the background image completely.

BJKDAW

Login to post a reply

Server time is: 2024-09-30 15:29:07
Your offset time is: 2024-09-30 15:29:07