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 / Menu System

Author
Message
lcfcfan
23
Years of Service
User Offline
Joined: 19th Feb 2003
Location: North East, UK
Posted: 27th Jul 2003 18:46
Need help making a menu system cos i have never done one before does anyone have any code i can take a look at to see how it's done?
Dark Editor
22
Years of Service
User Offline
Joined: 22nd Jul 2003
Location:
Posted: 27th Jul 2003 22:43
If your looking for buttons, then check out the sound recoder example that came with Dark Basic. enjoy
mason

When you get stuck with dark basic, look at the poster of Brittany Spears on your wall, it helps, trust me...
lcfcfan
23
Years of Service
User Offline
Joined: 19th Feb 2003
Location: North East, UK
Posted: 27th Jul 2003 23:12
I am making my own buttons and they look very cool so far it's not the graphics i am having a problem with just need an idea how i would start to code a menu system.

Thanx anyway Dark Editor

Shock
AGK Developer
23
Years of Service
User Offline
Joined: 24th Oct 2002
Location: United Kingdom
Posted: 28th Jul 2003 00:11 Edited at: 28th Jul 2003 00:12
Well, this is how i normally make a 2D menu system (ask if you get stuck on a part, and i'll whip up some code)

First, start off with a full-screen background image (a texture or something) and sprite that to the screen.

Next, create two blank buttons with no text on them. One one colour, one a different colour, (e.g. one blue and one green).

Load these buttons in as bitmaps and copy them for how many buttons you need, using a loop. I.E. for a "Play Game" button, you'll need a blue and a green bitmap for one button.

Make a for-next loop that chooses them as the current bitmap and shove some text on them. Your "Play Game" button will now be two bitmaps, one green and one blue, both with the words "Play Game" printed onto them. Ohyea, dont forget to put the current bitmap back to zero

Now convert those bitmaps into images, and into sprites. Place the blue version of each button onto the screen in different areas.

This bit inside a DO:LOOP
Check if the mouse is hovering over a certain sprite, if it is the green version of the button needs to be in place. Now you have roll-over buttons. If the mouse is moved away, the blue button should be in place. If the mouse is clicked, then you can send them to play the game or whatever.

Sorry that probably dosent make sense, i'm in a rush, but if you still need help then post away and i should be able to help in half hour or so.

...::::ShockForge::::...
lcfcfan
23
Years of Service
User Offline
Joined: 19th Feb 2003
Location: North East, UK
Posted: 28th Jul 2003 00:26
I have done all the graphics i'm just after code now.

Login to post a reply

Server time is: 2026-07-07 12:26:45
Your offset time is: 2026-07-07 12:26:45