[visionegg] Re: pygame mouse handling within VE

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Christoph,

I go through all pygame events... therefore making sure, that alle events are removed from the queue every time I call the for loop (almost every frame)

Andrew: Do you recommend it to do it like I did now (event queuing and going through all events) or would you recommend state checking as :
mouse.get_pressed([0]) #if right mouse button is right now down

My understanding is that the get_pressed() type methods add extra latency, so you're better to get all the events yourself.


You may be interested in event filtering, for example:

pygame.event.set_allowed(None) #allow no events
pygame.event.set_allowed(MOUSEBUTTONDOWN) #only allow buttondown

Cheers!
Andrew
-----BEGIN PGP SIGNATURE-----

iD8DBQE/RDoH1xWcCSPVbpgRAjZjAKCd9SCT/kmwX/B/H2ps7cN0paZZewCgsEMo
xqAMOUEtUZQehx0O4p+hCpU=
=3ZPv
-----END PGP SIGNATURE-----

======================================
The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

Other related posts: