[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] mouse scroll wheel
the scrollwheel is usually considered buttons 4 and 5 of the mouse.
however, the other buttons have a "down" and an "up" event. maybe the
wheel up/down is only one or the other, or maybe both at once?
so maybe you should be checking for MOUSEBUTTONUP instead of
MOUSEBUTTONDOWN
if event.type == MOUSEBUTTONDOWN (or UP)
print event.button, " -- expecting 4 or 5 here"
On Wed, 2003-08-13 at 11:11, David Mallwitz wrote:
> Is it possible to read up/down scrolling on a mouse wheel with Pygame?
>
> I've tried the following:
>
> if event.type == pyame.MOUSEBUTTONDOWN:
> print pygame.mouse.get_pressed
>
> and when the scroll wheel is moved up/down an event is generated and
> this is printed:
>
> (0, 0, 0)
>
> So pygame is seeing the event, but can't return to me any useful info.
> Or am I trying to read this using the wrong function?
>
> Thanks,
> Dave
--
+-------------------------------------------------------------+
| Shandy Brown Digital Thinkery |
| shandy@geeky.net http://www.digitalthinkery.com |
+-------------------------------------------------------------+