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

Re: [pygame] Voice Text To Speech and Wav File Make and Save

I use pygame.key.get_pressed().  I usually use the state of the input
in question rather than deal with events.  My generic input function
looks like:

def GetInput():
    key = pygame.key.get_pressed()
    for event in pygame.event.get():
        if event.type == QUIT or (event.type == KEYDOWN and event.key
            pygame.quit(); sys.exit()

For your purposes, I now add:

        if event.type == KEYDOWN:
    mpress = pygame.mouse.get_pressed()
    mpos = pygame.mouse.get_pos()

All untested (on vaction without a laptop); hope it works!

Good luck,