I wanted to make next menu exmample:
Main Menu
Character Menu
but the buttons still works from the main menu to the chracter menu i want it to make it so all functions only works in main menu and all functions in character menu only works in there
Main Menu:
Rem Created: Sunday, July 11, 2010
Rem ***** Main Source File *****
Set Display Mode 800,600,32
Sync On: Sync Rate 60
Load Image "File/Screen1.png",1
Paste Image 1,0,0
Load Music "File/Menu.mp3",1
loop music 1
Set Text Opaque
Do
Mx=MouseX(): My=MouseY(): Mc=MouseClick()
rem if MouseClick() Then Print MouseX();
rem if MouseClick() Then Print MouseY();
If Mc=1 Then Gosub CheckRegion
Sync
Loop
End
CheckRegion:
Rem First Button
If Mx > 35 and My > 73 And Mx < 374 And My < 201
play()
stop music 1
Center Text 400,580,"Choose Your Character!"
menu=0
Endif
Rem Second Button
If Mx > 34 and My > 271 And Mx < 338 And My < 354
Rem Add here, whatever code you want to be executed when you click button 2
Endif
Rem Third Button
If Mx > 41 and My > 427 And Mx < 232 And My < 502
Rem Add here, whatever code you want to be executed when you click button 5
End
Endif
Return
Character Menu:
function play()
Load Image "File/Screen2.png",1
Paste Image 1,0,0
Load Music "File/Character.mp3",2
loop music 2
CheckRegion2:
Rem Third Button
If Mx > 41 and My > 427 And Mx < 232 And My < 502
Rem Add here, whatever code you want to be executed when you click button 5
End
Endif
endfunction
Remember im a beginner i just downloaded darkbasic pro and its awsome
but hard so i hope some1 can help me