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.

Newcomers DBPro Corner / How to make Main Menu?

Author
Message
CRO Games
19
Years of Service
User Offline
Joined: 27th Mar 2005
Location: Croatia
Posted: 10th Apr 2005 22:46
Is there any tuturial on how to create main menu. How can I choose in menu: New game, Credits, Higihscore, Exit game with my keyboard with upkey and downkey. I need it for my game and Im just begginer. Im usign DBPro.
Dark Flame
19
Years of Service
User Offline
Joined: 15th Feb 2005
Location: England
Posted: 11th Apr 2005 01:23
If your anygood with photoshop or something similar then you could just create an image then have coding for mouse clicks at points where the newgame,load etc are.

RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 11th Apr 2005 01:34
Try "menu tutorial" down in the Google search. You'll find plenty.

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
SpazDC
19
Years of Service
User Offline
Joined: 20th Oct 2004
Location: Hmm... Good question
Posted: 11th Apr 2005 02:48 Edited at: 11th Apr 2005 02:50
here's a menu for you to try!!!



give me what i want and i will go away!
HWT
19
Years of Service
User Offline
Joined: 1st Apr 2005
Location: Earth
Posted: 12th Apr 2005 07:41
Hi

Here's a menu I made. Quite simple. I'll be happy to explain if you don't understand it

Hope it helps

HelloWorld Tommorrow
mr_fan
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: look... behind you.
Posted: 17th Apr 2005 06:50
All I have done is use functions. like menu() play_level_hard()
play_level_easy() so on and so forth, then have some input such as
e = easy() h = hard(). I hope this helps!
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 17th Apr 2005 09:56
CRO Games,

You have stated that you wish to use the keyboard to move about your menu's options. First, create two images for each option. The first as the 'non-selected', and the second as the 'selected'. These images could simply be a word or two, that the 'selected' image is lit up or brighter.

Now, with two images for each selectable option, we come to the coding. I will simply show you a method when coding to use the up and down arrow keys to select the different options. In my example source code I have a few options on the screen, New Game, Load Game and Quit, all centered and plain text(no media). Note that though I am using just text commands, this same method can be used with images. From here, copy and paste my source code in to DarkBasic and run it.

+NanoBrain+
James Morgan
19
Years of Service
User Offline
Joined: 17th Apr 2005
Location: Behind you
Posted: 18th Apr 2005 01:35
This is a function for creating a windows style main menu, its not finished - i only created it as a temperary measure until i either buy BlueGUI or recreate a menu using types.
Theres plenty of bugs such as not allowing you to have more than one sub menu called the same or having a 2nd sub menu but its a start. You also cant currenly use the keyboard to select the menu, just the mouse.


mainmenu_addDrop("FILE") will add a menu item called FILE
mainmenu_addSub(x,"Open") will add a sub menu called OPEN to the x drop.
menuAction$ = mainmenu_drawMenu("XPstyle") will determain the type of menu - Highlight, XPstyle or Grey

James Morgan
Antidote
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: San Francisco, CA
Posted: 18th Apr 2005 08:16
Use the idea that dark flame suggested where you make an image in photoshop or paint or something like that

Then if you want to take it a step further create seperate images for Play,Hi Score and so on

The make sprites out of them and say

if mousex()>sprite x(1) and mousex()<sprite x(1)+the width of the sprite and so on for the y coordinates

Then to enhance it when the mouse if over those sprites you can change the sprite alpha or diffuse

I have know idea what sflm stands for

Login to post a reply

Server time is: 2024-09-23 17:25:08
Your offset time is: 2024-09-23 17:25:08