CodeBase - Menu with play and exit buttons

Return to the CodeBase listing

Category: Complete Applications

Version: 1.0

0
0

Information

Uploaded: 29th Jun 2006 00:04

Modified: 1st Jan 1970 01:00

Author:  Anonymous Coder

Summary

rem improvements rem play and exit highlight when the mouse is over them cls LOAD music "1.wav",2 load image "lava1.bmp",1 gosub makemenu do if (mousex() > 285 and mousex() < 385 and mousey() > 160 and mousey() < 220 and mouseclick()=1) then gosub game if (mousex() > 285 and mousex() < 385 and mousey() > 230 and mousey() < 290 and mouseclick()=1) then gosub rip loop game: cls print "you made it" rem this is where you write the game code sleep 10000 gosub makemenu return rip: end return makemenu: LOOP music 2 paste image 1,0,0 paste image 1,255,0 paste image 1,510,0 paste image 1,0,255 paste image 1,255,255 paste image 1,510,255 set text to bolditalic text 285,190, "Play" text 285,260, "Exit" return

Full Description

rem improvements<br /> rem play and exit highlight when the mouse is over them<br /> cls<br /> LOAD music &quot;1.wav&quot;,2<br /> load image &quot;lava1.bmp&quot;,1<br /> gosub makemenu<br /> <br /> do<br /> if (mousex() &gt; 285 and mousex() &lt; 385 and mousey() &gt; 160 and mousey() &lt; 220 and mouseclick()=1) then gosub game<br /> if (mousex() &gt; 285 and mousex() &lt; 385 and mousey() &gt; 230 and mousey() &lt; 290 and mouseclick()=1) then gosub rip<br /> loop<br /> <br /> <br /> <br /> <br /> game:<br /> cls<br /> print &quot;you made it&quot;<br /> rem this is where you write the game code<br /> sleep 10000<br /> gosub makemenu<br /> return<br /> <br /> rip:<br /> end<br /> return<br /> <br /> makemenu:<br /> LOOP music 2<br /> paste image 1,0,0<br /> paste image 1,255,0<br /> paste image 1,510,0<br /> paste image 1,0,255<br /> paste image 1,255,255<br /> paste image 1,510,255<br /> set text to bolditalic<br /> text 285,190, &quot;Play&quot;<br /> text 285,260, &quot;Exit&quot;<br /> return

Comments

No comments yet.