2d stuff

Blitz3D Forums/Blitz3D Beginners Area/2d stuff

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

it's not working i got it so it stays up but i cant get it to go away again here is my updated code:

Graphics 1024,740,32,2
SetBuffer BackBuffer()
HidePointer

button=LoadImage("Button.bmp")
popup=LoadImage("popup.bmp")
popupstat=0

pointer=LoadImage("Mouse pointer.bmp")

While Not KeyHit(1)
Flip

Cls
Color 0,0,0
DrawImage button,0,711

If MouseHit(1) Then
If ImagesOverlap (pointer,MouseX(),MouseY(),button,0,711)
popupstat=1
EndIf
EndIf

If popupstat=1 Then
DrawImage popup,0,417
EndIf

If popupstat=1 Then
If MouseHit(1) Then
If ImagesOverlap (pointer,MouseX(),MouseY(),button,0,711)=0 Then
popupstat=0
EndIf
EndIf
EndIf

DrawImage pointer,MouseX(),MouseY()

Wend
End

what is wrong with it now.