Wait for an event, but don't take it off the queue
Is there any way to make the program sleep until an event occurs, but to not take it off the queue?
Similarly to http://www.pygame.org/docs/ref/event.html#pygame.event.wait
Or will I need to use pygame.event.wait, and then put that event back onto the queue?
Just to clarify, I do not need to know what that event is when it occurs, just that an event h开发者_Go百科as occured.
You will need to do what you suggest and post it back onto the queue. If the ordering is important (which it often is), then just keep your own queue of already retrieved events, and whenever you want to start processing events normally, just handle your own list first before draining pygame's queue.
I'm at a loss as to why you would want to know an event came in but not to handle it, however.
精彩评论