Ok, I guess I do need a bit of help, it's harder than I thought. I am just flat out confused how to use RECTSOVERLAP, here is what I have at the moment.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function MainMenu()
Cls
DrawImage Title,0,0
DrawImage Start,250,125
DrawImage Credits,250,250
DrawImage Quit,250,375
Flip
result=0
While result=0
mx=MouseX():my=MouseY()
If RectsOverlap(250,125,mx,my,0,0,0,0) Then
Cls
DrawImage Title,0,0
DrawImage Quit,250,125
DrawImage Credits,250,250
DrawImage Quit,250,375
EndIf
If MouseDown(1) Then
If ImageRectOverlap(Start,250,125,mx,my,1,1) Then result = 1 ;Start was clicked
If ImageRectOverlap(Credits,250,250,mx,my,1,1) Then result = 2 ;Credits was clicked
If ImageRectOverlap(Quit,250,375,mx,my,1,1) Then result = 3 ; Quit was clicked
End If
Wend
Return result
End Function
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
But I have no idea how to use RECTSOVERLAP it needs 8 peramiters and I can't use 1 right... It tried many different things but I just am stumpped.
Also how do u make that black and green box for code. Thanks.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function MainMenu()
Cls
DrawImage Title,0,0
DrawImage Start,250,125
DrawImage Credits,250,250
DrawImage Quit,250,375
Flip
result=0
While result=0
mx=MouseX():my=MouseY()
If RectsOverlap(250,125,mx,my,0,0,0,0) Then
Cls
DrawImage Title,0,0
DrawImage Quit,250,125
DrawImage Credits,250,250
DrawImage Quit,250,375
EndIf
If MouseDown(1) Then
If ImageRectOverlap(Start,250,125,mx,my,1,1) Then result = 1 ;Start was clicked
If ImageRectOverlap(Credits,250,250,mx,my,1,1) Then result = 2 ;Credits was clicked
If ImageRectOverlap(Quit,250,375,mx,my,1,1) Then result = 3 ; Quit was clicked
End If
Wend
Return result
End Function
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
But I have no idea how to use RECTSOVERLAP it needs 8 peramiters and I can't use 1 right... It tried many different things but I just am stumpped.
Also how do u make that black and green box for code. Thanks.