I can't run without the pics, but does not generate any errors from "Check for errors F7" in "Program" menu.
Graphics 800,600
;Images
COE=LoadImage("cube_of_evil.bmp")
hand=LoadImage("hand.bmp")
title=LoadImage("title.bmp")
Xbound=LoadImage("X-boundary")
Ybound=LoadImage("Y-boundary")
mouse=LoadImage("mouse.bmp")
new0=LoadImage("newgame.bmp")
highscore0=LoadImage("highscore.bmp")
Global highscore1=LoadImage("highscore1.bmp")
options0=LoadImage("options.bmp")
Global options1=LoadImage("options1.bmp")
Global neww=LoadImage("newgame1.bmp")
;Fonts
fntArial=LoadFont("Arial",48,False,True,False)
fntbroadway=LoadFont("Broadway",36,False,False,False)
fntgameover=LoadFont("Chiller",48,True,True,False)
;================
Global ExitFlag% ;<- added this
;================
While Not KeyDown(1)
; SetFont fntArial ;this font is not used here
Color 0,0,255
;menu
SetFont fntbroadway
Cls
DrawImage title,200,0
DrawImage new0,300,250,0
DrawImage highscore0,300,300,0
DrawImage options0,300,350,0
DrawImage mouse,MouseX(),MouseY()
HighlightNewGame(mouse,MouseX(),MouseY(),300,250,205,31)
HighlightHighScore(mouse,MouseX(),MouseY(),300,300,205,31)
HighlightOptions(mouse,MouseX(),MouseY(),300,350,205,31)
Delay 25
Flip
;============================
If ExitFlag = 1 Then Exit ;<- added this
;============================
Wend
End
Function HighlightNewGame(a1%,a2%,a3%,a4%,a5%,a6%,a7%)
If ImageRectOverlap(a1,a2,a3,a4,a5,a6,a7)
DrawImage neww,300,250,0
End If
End Function
Function HighlightHighScore(a1%,a2%,a3%,a4%,a5%,a6%,a7%)
If ImageRectOverlap(a1,a2,a3,a4,a5,a6,a7)
DrawImage highscore1,300,300,0
End If
End Function
Function HighlightOptions(a1%,a2%,a3%,a4%,a5%,a6%,a7%)
If ImageRectOverlap(a1,a2,a3,a4,a5,a6,a7)
DrawImage options1,300,350,0
End If
End Function
Function Click1(HighlightNewGame)
If MouseDown(1) And HighlightNewGame = 1 Then
; Goto .newgame ;this label does not exist outside of this function as far as Blitz is concerned
;===================
NewGame() ;changed label to function and added ExitFlag
ExitFlag = 1
;===================
End If
End Function
;========================== ;changed your label into a function
Function NewGame()
Text 400,300,"NEW GAME"
Delay 5000
End Function
;==========================To make codebox like the one above do the following:
STEP 1:
[-code] <---- copy this
paste into Blitz forum window
erase minus sign from what you pasted into Blitz forum window
STEP 2:
Paste your code right after where you pasted step 1 (or skip this if editing an existing post)
STEP3:
[/code] <---- copy this
erase minus sign from what you pasted into Blitz forum window
paste into Blitz forum window immediately after your pasted or edited source code
See forum codes here:
http://www.blitzbasic.com/faq/faq_entry.php?id=2[Edited to reflect Senzak's make bold suggestion - but it didn't work :\ ]