[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Clearing the mouse and keyboard state
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] Clearing the mouse and keyboard state
- From: "Jason Ward" <nyad55@xxxxxxxxx>
- Date: Sun, 6 Jan 2008 18:39:22 +0200
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Sun, 06 Jan 2008 11:39:31 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=B3P9GCiKn9Km0CZpaI/Fko9pStIR/QybNQvgIuNLsrU=; b=byc1ow9K7XUrfpuNgxxCRVL4HrSKUmQS3RMsOGlp91dys2rzc96bVSZcKZKLcOpZHTtesm9F/9b5U0n439p60YJlsKnaBc0fa36HxQoScMtMcws56fhHtylIIVEwWbTuYu6XoqSE/o9d3ISuPUuodQIIh07Nx6O3Bnppwk3aQO4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=YjMndbKqRAdHyTdg0I/zcY6pnQaaS9idCyP73F6D9mliFJ8Pq37DF2ZyKFDmgwGJyoKnl5DoUbjEOvN4oQcy1jzsd+tLzuXVUVsIrseyJllTKUgDEKznP6j5HXWKfslolDfJUlLuEIj15QNCiItSi15ipB8TIzRzQi6ZSKupw4A=
- In-reply-to: <400.699-18800-708411044-1199637302@xxxxxxxxx>
- References: <400.699-18800-708411044-1199637302@xxxxxxxxx>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
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 :)