Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mouse wheel scrolls dropdown list #3644

Closed
DorpsGek opened this issue Feb 25, 2010 · 1 comment
Closed

Mouse wheel scrolls dropdown list #3644

DorpsGek opened this issue Feb 25, 2010 · 1 comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

sbr opened the ticket and wrote:

This patch allow to change the selected item of a dropdown by using the mouse wheel over the WWT_DROPDOWN button.

Two new functions are defined in src/widgets/dropdown.cpp:
- void ScrollDropDownList(Window *w, DropDownList *list, int selected, int button, int wheel)
- void ScrollDropDownMenu(Window *w, const StringID *strings, int selected, int button, uint32 disabled_mask, uint32 hidden_mask, int wheel)

They are used in the same way that the existing ShowDropDownList(...) and ShowDropDownMenu(...) but inside the OnMouseLoop(int wheel) handler of windows.

The list are scrolled one item at a time whatever scroll step is defined. Also list looping isn't supported: if one of the ends of the list is reached, following mouse wheel in the same direction are ignored.

The first attached patch defines the scrolling functions.
The second attachment is a tar of patches that use these functions on almost all WWT_DROPDOWN used in the guis.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/3644
@DorpsGek
Copy link
Member Author

andythenorth closed the ticket.

Reason for closing: Won't implement

Flyspray clean up: more than 5 years old, and not obvious what should be done with this next, so closing. If this offends, discuss with andythenorth in irc. Thanks.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3644

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

No branches or pull requests

1 participant