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

Author
Message
LuNaR
19
Years of Service
User Offline
Joined: 6th Mar 2005
Location:
Posted: 13th Mar 2005 07:54
Hey! I added some code in my game for a menu, doesn't really work. How would I make it so that when my game starts and image appears and if I click Play it plays and if I click Exit, it exits?


Heres my code:


-If Practice makes Perfect, and nobody is perfect, why practice?-
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 13th Mar 2005 08:47
Well you are hiding your mouse so you would either have to show it or make a sprite for its position. Put that subroutine at the bottom of your code and call it with gosub main_menu ( do the same with functions but you call them like main_menu() if that was a function).
You will want to check for the mouse position (if it is over the area of the "play" button area and mouse button is clicked) and exit the loop and the return command will bring you back up top.

Login to post a reply

Server time is: 2024-11-13 20:12:46
Your offset time is: 2024-11-13 20:12:46