[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] MOUSEBUTTONDOWN question



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"


any ideas?
Thanks

steve