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

Re: [pygame] Clearing the mouse and keyboard state



I usually do this.
 
#once a buttun has been clicked you can do what you want, setting the mouse state
to not pressed but this is easier.
 
 
while pygame.mouse.get_pressed()[the button]  == 1:
        pygame.event.pump()
 
this will loop until they let go of the mouse button, you may want to refresh the screen or
something but do what works.
 
Easy hey :)