-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
console.lua: allow clicking selectable items #15016
Conversation
This is a game changer, much appreciated. @bt4ibwem8 was talking to me about this very thing. Personal side of things, absolutely loving that select.lua is now part of mpv. |
8215cee
to
b9114b7
Compare
Download the artifacts for this pull request: |
I think it would be good to keep highlighted item follow mouse pointer. |
b9114b7
to
e6cdc97
Compare
Should left mouse click select currently highlighted element instead of mouse position? |
e6cdc97
to
a0ba0e2
Compare
I updated the highlight before clicking. Chrome and Firefox separately highlight the lines with keyboard and pointer focus but it might be overkill here. |
This adds click support for the select menu. Scrolling with the wheel already worked. If a custom OSC binds a button to a select.lua script-binding, this lets users keep using the mouse to select an item. While the OSC and the select menu are open at the same time, you can no longer click the OSC's buttons. By using mp.add_key_binding instead of add_forced_key_binding you could click both, but the console's binding would be shadowed by MBTN_LEFT bindings in input.conf.
a0ba0e2
to
8237e61
Compare
After a discussion at mpv that started with this: mpv-player/mpv#15016 It has lead to a complete removal of redundant functions that mpv is already capable of doing from the osc. References: mpv-player/mpv#15031 mpv-player/mpv#15038 Also, increased title max character limit to fix #9
This adds click support for the select menu. Scrolling with the wheel already worked.
If a custom OSC binds a button to a select.lua script-binding, this lets users keep using the mouse to select an item.
While the OSC and the select menu are open at the same time, you can no longer click the OSC's buttons. By using mp.add_key_binding instead of add_forced_key_binding you could click both, but the console's binding would be shadowed by MBTN_LEFT bindings in input.conf.
Inspired by https://github.com/Samillion/ModernZ