[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Pointer module
- To: pygame-users@xxxxxxxx
- Subject: [pygame] Pointer module
- From: "Thiago Chaves" <shundread@xxxxxxxxx>
- Date: Sun, 11 Jan 2009 22:53:03 +0200
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Sun, 11 Jan 2009 15:53:07 -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:mime-version:content-type; bh=aYzayJ7em/8QI6B14GFoYJg2WHtOS28eYuO1c8fesuc=; b=FbR/tIx4SgDXE6VVvrtT++RVblqpaxDLdwXh5e1AY8ORqhlVhmFONKD4RvPZRAJQYQ P4BT9AilIXtgJuC2eAyRUMXGnC81g6aeTk595NPRNDx5KSWdWWj2CUcy7pxBoekqjgXc rquAdSdPH44oBQAseaOMyS/3wWl3kIg5LM0LI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=fM9M9TKOxCV/moGsI+58ZBJSLg6Nc9XamggiW0phPKWC20PLN7fjDP0oDuMPhZvRf1 FohN9fhmAJAMTN8reHnbDHiQ14WpAqmRs+nPxXoRlJGUJRE/6WyooUdp4TA4KlrP1D4k HNhma6KO0+AgbnQgwCt4fIsR41A1VBjUzjhLY=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hi,
I decided to improve the UI on my recent project and decided to allow
users to use joysticks as pointing devices too. To do that I defined a
class that encapsulates both mouse and joystick and gives them an
interface (slightly) similar to the mouse module. I figure the pointer
classes could still be improved, but I decided to release one early
version of it along with an example to get some early feedback on the
idea.
There's really no advantage on using this over mouse module if you're
using only mouse. It'd make sense in situations where you got both
joysticks and mouse as pointing devices. (local multiplayer
point-and-click games, anyone?)
There's an example, which just uses the mouse and as many joysticks as
you have as pointing devices. Notice the joystick devices start
pointing at (0, 0)
Could anyone give this a try and give me some feedback? What is good?
What is bad? What is missing? What is unnecessary?
Thanks,
-Thiago
Attachment:
Pointer-2009-Jan-11.zip
Description: Zip archive