Mouse going off window

Blitz3D Forums/Blitz3D Beginners Area/Mouse going off window

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.

Ok, i found a quick fix for that problem, now i'm stumped, why is the mouse image lagging behind the mouse? on the "Imagescollide" example it follows the image perfectly.. this is my code for a main menu:

Function Mainmenu()
Graphics 800,600,32,2

selection=1

mainimage=LoadImage("mainmenu.png")
continue=LoadImage("Playbutton.png")
mouse=LoadImage("mouse.png")
MaskImage mouse,255,0,255



While selection=1
mouse_x=MouseX()
mouse_y=MouseY()
Cls


DrawImage mainimage,0,0
DrawImage continue,100,400
DrawImage mouse,mouse_x,mouse_y

If ImageRectCollide(continue,100,400,0,MouseX(),MouseY(),5,5) And MouseHit(1)
selection=2
End If

If KeyHit(1)
End
End If

Delay 5
Wend


EDIT: and yes i did try to take out the delay it doesnt change it