Just making a quick game where you trace out a shape on the screen while
holding the mouse button.
Trying to check for a collision with the mouse while the button is down,
but for some reason it seems to only check for collision when the button
initially goes down, but doesn't keep checking for collision when the
mouse button is held down.
But I think it should since this is all in the event loop
if event.type is MOUSEBUTTONDOWN:
pos=pygame.mouse.get_pos()
mouseRect=[[pos[0],pos[1]],[5,5]]
mouseRect=Rect(mouseRect)
m=mouseRect.collidelist(shape)
if m==-1:
print "oops! Your not on the shape anymore"
you only get this MOUSEBUTTODOWN event when the button is first pressed,
not every frame while it is held down. what you'll want to do is keep
track of the MOUSEMOVEMENT events, when the mouse has been pressed.