[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Mouse wheel
Thanks, works like a charm.
Bo)
Jasper Phillips wrote:
On Tue, 27 Apr 2004, Bo Jangeborg wrote:
Is it possible to determin if the scroll wheel of the mouse is moving up
or down ?
Yes. Roughly like so, ignoring the surrounding loop code:
event = pygame.event.poll()
if event.type == locals.MOUSEBUTTONDOWN:
if event.dict['button'] == 4:
print 'Wheel Down'
elif event.dict['button'] == 5:
print 'Wheel Up'
-Jasper