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

Re: [pygame] raw_input() and pygame.event.get()



Oops, I forgot to mention that.  I'm using raw_input() because I want to focus on getting my game working before putting time into writing a GUI.  Without a GUI, the only way I can get user input is with raw_input().  I'm working on my networking code, so I need to have each game instance ask the user (i.e. myself) to host a new game or join an existing game.

Does that make sense?
On Monday 11 December 2006 14:53, Mike Wyatt wrote:
  
How can I prevent key presses performed during a call to raw_input()
from being added to pygame's event queue?  I've tried calling
pygame.event.clear() after the call to raw_input(), but KEYDOWN events
are still processed by pygame.event.get() once the PyGame window gets
focus back from the console window.  I've also tried calling
set_blocking(KEYDOWN)/set_blocking(None) and
set_blocking(KEYDOWN)/set_allowed(None), but that results in no events
being processed by pygame.event.get()
    

May I ask why you're using raw_input *and* pygame's event queue?