mickelson / attract

A graphical front-end for command line emulators that hides the underlying operating system and is intended to be controlled with a joystick or gamepad.
http://attractmode.org
GNU General Public License v3.0
393 stars 115 forks source link

Improve mouse navigation in overlay menus #748

Closed mbarnes closed 1 year ago

mbarnes commented 1 year ago

Two changes to FeOverlay::event_loop():

This makes overlay menus easier to navigate using a trackball or rotary spinner that presents as a mouse device.

Additional context:

I use Attract-Mode in a cocktail-style arcade cabinet with swappable control panels. For panels where the only directional control is a trackball or rotary spinner, I have Attract-Mode's input map configured to include Mouse Up for up and Mouse Down for down:

$ cat ~/.attract/attract.cfg
...
input_map
        ...
        up                   Up
        up                   R
        up                   Mouse Up
        down                 Down
        down                 F
        down                 Mouse Down
        ...

But mouse navigation in the overlay menus -- even just the exit confirmation dialog -- has been quite difficult. Mouse movement is erratic and hard to control with any precision. This pull request attempts to fix it.

mickelson commented 1 year ago

thanks!