#8085 closed patch
NewGUI: mouse wheel support
Reported by: | eriktorbjorn | Owned by: | fingolfin |
---|---|---|---|
Priority: | normal | Component: | GUI |
Version: | Keywords: | ||
Cc: | Game: |
Description
This is an attempt to add mouse wheel support to the NewGUI list and scrollbar widgets. (I haven't looked much at the NewGUI code before. I hope I didn't mess it up too badly. :-)
Of course, this means the backend has to be updated slightly so that it will generate EVENT_WHEELUP and EVENT_WHEELDOWN events. I only know enough to do this for the SDL backend, and only for SDL 1.2.5 and later since it uses the SDL_BUTTON_WHEELUP and SDL_BUTTON_WHEELDOWN constants.
It's probably easy to support earlier SDL versions, but I didn't see much point in doing so.
Ticket imported from: #620627. Ticket imported from: patches/190.
Attachments (1)
Change History (6)
by , 22 years ago
Attachment: | mousewheel.diff added |
---|
comment:1 by , 22 years ago
Although the recommended version for ScummVM is always the latest, we do need to support at least down to 1.2.3, for compatability reasons.
A lot of distributions obviously don't ship with the greatest and latest yet, and theres no reason to require people to upgrade for a small feature that many probably won't use.
comment:2 by , 22 years ago
Understood.
Note however that it should still be possible to compile against older SDL libraries. (I haven't actually tried it, but it was my intention.) It's just that it will never generate mouse wheel events if you do.
What I meant by not supporting older SDL versions was that maybe it would be possible to get it to work simply by defining the SDL_BUTTON_WHEELUP and SDL_BUTTON_WHEELDOWN constants. At least as far as X is concerned the mouse wheel is just sending mouse button clicks. But why bother?
comment:3 by , 22 years ago
BTW while there is no reason to enforce SDL 1.2.5, I'd still very strongly recommend using it over any older version to everybody, as it fixes many many bugs on Linux/Windows/MacOS
comment:4 by , 22 years ago
Owner: | set to |
---|---|
Status: | new → closed |
comment:5 by , 6 years ago
Component: | → GUI |
---|
Patch against an October 8 CVS snapshot