[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[pygame] event processing?
The docs mention that event.poll() returns a NOEVENT event if nothing
is on the queue, and this has a type that evaluates to 0. How do I
determine the type of an event? My code looks like this:
event = pygame.event.poll()
if event == NOEVENT:
blah bah
Of course, this doesn't work. Printing the event gives me:
<Event(0-NoEvent {})>
But I don't know how to test for this. Shouldn't this event contain a
dictionary with a 'type' key and a value of NOEVENT? So I could do
this:
if event['type'] == NOEVENT:
Thanks.
PS. In the docs, the display.set_caption and get_caption functions are
misnamed as doc_set_caption and doc_get_caption.
--
David "Futility [D!]" Clark | I will only complicate you - |
silenus@telus.net | Trust in me and fall as well. - Tool |
------------------------------------------------------------------------
http://www3.telus.net/futility/futility/
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org