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.

DarkBASIC Discussion / Code for menu for a game

Author
Message
Captain America
20
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Here
Posted: 8th Apr 2005 11:06
I need help on making a menu for my game.
I already have the images, but I just don't know how to make it so that when the mouse clicks in a certain area on the screen it has to clear the screen then display another screen.

Ex: Like when a game loads and you don't know the controls you'll click on the 'controls' button and it will display another screen. Then there is usually a back button, but I think I can handle that with gosub commands.

How should I go about doing this?

Cheers,
Capt. America
HWT
20
Years of Service
User Offline
Joined: 1st Apr 2005
Location: Earth
Posted: 9th Apr 2005 00:15 Edited at: 9th Apr 2005 00:21
Hi there

First, I just need to say that menu making is actually quite a complicated program but you needn't fret It's do-able but will take some time and dedication.

Here is a newer version for a main menu code I just wrote which uses mathematical co-ordinates. The same basic procedure is the same and follows the attached flow chart (see download).



You could also check out the Code Base particularly this search result (keyword "Menu")href]
http://www.thegamecreators.com/?m=codebase_search&global=true&ca=&la=&ma=25&te=menu&sc=summary&p=[/href]

Please feel free to ask if you have any doubts

Good Luck!

HelloWorld Tommorrow

Attachments

Login to view attachments
EddieB
20
Years of Service
User Offline
Joined: 29th Sep 2004
Location: United Kingdom
Posted: 9th Apr 2005 01:01
Nice little menu you have there

[href]http:www.graphics-monkey.co.uk[href]
HWT
20
Years of Service
User Offline
Joined: 1st Apr 2005
Location: Earth
Posted: 9th Apr 2005 02:12 Edited at: 9th Apr 2005 02:13
Quote: "Nice little menu you have there "


Thank you Eddie B

HelloWorld Tommorrow
Captain America
20
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Here
Posted: 10th Apr 2005 06:40
Hey thank HWT! I'm trying it right now!

Cheers,
Capt. America
Captain America
20
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Here
Posted: 10th Apr 2005 06:48
Wow!! It worked great!!
WOW!! That is so cool!
Thanks a ton!
Sweet!!
Ok, it worked great thanks.
Now I'll just add some code for my game and waalaa!
Thanks again!!

Cheers,
Capt. America
HWT
20
Years of Service
User Offline
Joined: 1st Apr 2005
Location: Earth
Posted: 10th Apr 2005 08:36
Your welcome Captain American Glad I could help

Good luck with the rest of your project

HelloWorld Tommorrow
AndLabs
20
Years of Service
User Offline
Joined: 7th Dec 2004
Location:
Posted: 10th Apr 2005 08:44
HWT, there's a flaw that clicking on a certain part of the "Quit Game" word will also click on "Yes". Fix that?

For the Software You Want, AMPERSAND LABORATORIES is the place!
HWT
20
Years of Service
User Offline
Joined: 1st Apr 2005
Location: Earth
Posted: 10th Apr 2005 10:27 Edited at: 11th Apr 2005 07:17
Sure I'll fix it - just give me some time though because right now I have to go to sleep (it's 3.30am here ).

EDIT: Sorry I'm late Here is the code for the menu - almost the same except that when the user clicks to quit, I signal (by means of a variable) that the mousebutton is down and wait for it to be released until he can click again (on "Yes" or "No")

HelloWorld Tommorrow

Attachments

Login to view attachments
Lover of games
20
Years of Service
User Offline
Joined: 17th Apr 2005
Location:
Posted: 17th Apr 2005 16:39
Didn't really work for me, cuase i pasted it and it compiled but it just went into the game it self. Maybe I did something wrong? Also how do u add images to it, Or a moving back ground like that one game you guys have on here I was playing it and it seemed pretty hard. I forget what the name of it is

"Originally I was going to have a BS on it but you know how that would be. I can't walk around with the letters BS on me." More or less a qoute by Syndrome from Jack, Jack, attack

Login to post a reply

Server time is: 2025-05-23 12:33:57
Your offset time is: 2025-05-23 12:33:57