I'm having some issues with my menu. It works all except one part: I'm trying to have a seperate menu loop, so when you press ESC, It opens a repeat ... forever loop. Before doing the menu loop, a snapshot of the current screen is taken and copied into an image (the background image). Throughout the loop, the screen is clears, the background image is drawn under everything else, to give the impression of time "freezing". However, my method does not work, the loop correctly draws the menu images and all, but not the background image, upon hitting ESC, the background is just black. Why??
That's the english version of it, here's the blitz3d version: TAKE NOTE, THE IMAGE "BGIMAGE2" IS DECLARED AS A GLOBAL IMAGE AS THE SIZE OF DISPLAYWIDTH, DISPLAYHEIGHT
If KeyHit(1) Then
CopyRect 0, 0, displaywidth, displayheight, 0, 0, BackBuffer(), ImageBuffer(bgimage2)
Repeat
Cls
DrawImage bgimage2, 0, 0
DrawImage menu, displaywidth/2, displayheight/2
If MouseY() > 653 And MouseY() < 695 Then
If MouseHit(1) Then
quit=1
Exit
EndIf
DrawImage menuhighlight, displaywidth/2, 674
EndIf
If MouseY() > 745 And MouseY() < 790 Then
If MouseHit(1) Then Exit
DrawImage menuhighlight, displaywidth/2, 767
EndIf
If KeyHit(1) Then Exit
DrawImage gfxmouse, MouseX(), MouseY()
Text 10, 880, MouseY()
Flip()
Forever
EndIf
|