sojamo / controlp5

A gui library for processing.org
GNU Lesser General Public License v2.1
490 stars 142 forks source link

Dropdown usability problem on graphic tablets #58

Closed hamoid closed 7 years ago

hamoid commented 8 years ago

I'm finding it almost impossible to click on options on a dropdown, or to open/close the dropdown menu.

The reason is that with graphic tablets is very hard to click and release on the same exact pixel, and if it does not happen on the same exact pixel, the event apparently is not registered.

One solution might be to only observe mouse release events. Another would be to add a distance threshold, so if click and release happens less than X pixels apart, it's considered a valid click.

The same issue exists with ScrollableList.

hamoid commented 8 years ago

I tried to hack in the desired behavior by using .onRelease(), but it seems the callback does not tell me which of the options was clicked, so there's no way I can emulate the click. I'll keep thinking...

hamoid commented 8 years ago

Looking at the source code I noticed I can use the ENTER key to emulate clicks. That will be my solution for now.