[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Windows python2.4 pygame test binary installer. Please test!
Matthias Baas wrote:
...
Well, everything seems to be normal over here. The button attribute of
the MOUSEBUTTONDOWN event is 1 for the left mouse button, 2 for the
middle button and 3 for the right button (and 4 and 5 for the wheel).
I've just checked with Python 2.2.2/pygame 1.5.3, Python 2.3.4/pygame
1.6.2 and Python 2.4 under WinXP.
If anyone wants to check their version, here's a little test script:
Hmm, maybe the code has *always* been wrong... strange to think that
no-one (myself included) has ever used the right-mouse-button to orbit
an object. Possible I suppose; I primarily test with GLUT or wxPython
contexts:
For OpenGLContext:
0 -- first mouse button, "left"
1 -- second mouse button, "right"
2 -- third mouse button, "middle"
But here's the code for the PyGame mouse events:
def _updateButtons( self, button, state ):
"""Update the tracked state for mouse buttons
pygame is 1+ context button IDs
"""
self.CURRENTBUTTONSTATES[button-1] = state
return button-1
which doesn't mention anything about rearranging the order.
Anyway, trivial change to implement. Thanks for letting me know I'm off
base, Matthias,
Mike
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.com
PyCon is coming...