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

Author
Message
DarkSith
21
Years of Service
User Offline
Joined: 8th Nov 2002
Location: United Kingdom
Posted: 8th Nov 2002 14:30
Right, I've got a menu system in mind but I could use some help as to how to implement it. Button roll-overs would be nice when the mouse pointer is over them, then when the mouse is clicked goes to that section, I know the basics (sorry bad pun) just need some help on the roll-overs.
Could someone help? Please?

Many, many, may thanks in advance
Guardian of Hell
indi
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 8th Nov 2002 15:14
u might want to make this into functions or use arrays or something else but here is an example of the essence




indi is part of Team Lunarpixel
multimedia logisitics and interactive media
TheNVS
21
Years of Service
User Offline
Joined: 25th Oct 2002
Location: United States
Posted: 9th Nov 2002 01:36
i dont know exactly what you are talking about but i read that you need a menu. i think this would help. just pop it in darkbasic and run it. it should work. give me $10 for this code(just joking)


DarkSith
21
Years of Service
User Offline
Joined: 8th Nov 2002
Location: United Kingdom
Posted: 13th Nov 2002 12:20
To indi: Yep the rollover works, is there one for images/bitmaps?

To nvs_victor: Tried to run it in DB 1.12, didn't like some of the commands any help?

Guardian of Hell
indi
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 13th Nov 2002 12:34
u can just replace the ink and box commands
or retexture a sprite if you used one.

DarkSith
21
Years of Service
User Offline
Joined: 8th Nov 2002
Location: United Kingdom
Posted: 13th Nov 2002 16:46
Right, might try that when i get home, do i need separate images to do this?
I also have a wicked fade effect using images, go to the tutorial <b>Gamma Fading</b> and get the fade in and out code then take out the "make circle" and replace it with an image. Add sound and you're away!

Guardian of Hell
DarkSith
21
Years of Service
User Offline
Joined: 8th Nov 2002
Location: United Kingdom
Posted: 14th Nov 2002 11:27
Based this on indi's code for rollover button.


sync on
sync rate 0
x=0
y=50
x2=x+50
y2=y+50
do
load bitmap "your bitmap here 1.bmp"
if mousex()>x and mousey()>y and mousex()<x2 and mousey()<y2
load bitmap "your bitmap here 2.bmp"
else
load bitmap "your bitmap here 1.bmp"
endif
if mouseclick()=1 and mousex()>x and mousey()=>y and mousex()<x2 and mousey()<y2
gosub new_game
suspend for mouse
endif
sync
loop
new_game:
cls
load music "your music.mid",1 : loop music 1


Guardian of Hell
TheNVS
21
Years of Service
User Offline
Joined: 25th Oct 2002
Location: United States
Posted: 14th Nov 2002 12:45
try my program in v1.13. it is similar to indi's code. but mines have functions that allow you to do more options like"play game,option,exit" easier. though, you got the idea.

DarkSith
21
Years of Service
User Offline
Joined: 8th Nov 2002
Location: United Kingdom
Posted: 14th Nov 2002 13:15
nvs_victor: Ah that's why it didn't work. I've got version 1.12.
could you possibly re-do it for version 1.12?

My computer system: AMD Duron 1.3GHz, 256MB RAM, Trident 3D Blade, Savage Sound, 40GB Hard drive.
TheCyborg
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Denmark
Posted: 14th Nov 2002 13:19
I've made a menu system in 3D. It's a cube wich is rotated by mouse movement. When clicking the mouse will detect wich site of the cube you are looking at. A bitmap for each site. When clicking all textures is reloaded to the new menu. Source on my homepage, link below.

TheCyborg Development.
http://TheCyborg.Amok.dk
The Ultimate Source To DarkBASIC Programming.
DarkSith
21
Years of Service
User Offline
Joined: 8th Nov 2002
Location: United Kingdom
Posted: 14th Nov 2002 13:44
Don't suppose you could post the source code? I'll mention you in the credits when i get my game going.

My computer system: AMD Duron 1.3GHz, 256MB RAM, Trident 3D Blade, Savage Sound, 40GB Hard drive.
TheCyborg
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Denmark
Posted: 14th Nov 2002 14:08
Goto my homepage and download the source because there are some media to. (bitmap files)
http://TheCyborg.Amok.dk/
The page is not in danish just bacause of the .dk extension.
I looked up "Amok" in my danish-english dictionairy, the direct translation is "Go Berserk"...

TheCyborg Development.
http://TheCyborg.Amok.dk
The Ultimate Source To DarkBASIC Programming.

Login to post a reply

Server time is: 2024-04-16 16:32:57
Your offset time is: 2024-04-16 16:32:57