Added option `top_bar_alt_title`, which accepts an alternative title template to be displayed, and `top_bar_alt_title_place` that controls where it should be displayed. It can be either `below` to place it below the main one, or `toggle` to show it in place of the main title when user clicks the top bar or calls the `toggle-title` binding.
The `top_bar_title` now also accepts a custom top bar title template if user wants it to be different from the one defined in `mpv.conf`.
closes#402
This allows 3rd party scripts to replace the handling of built in uosc key bindings with their own logic.
Example that replaces uosc's basic stream quality menu with christoph-heinrich/mpv-quality-menu:
```lua
mp.commandv('script-message-to', 'uosc', 'overwrite-binding', 'stream-quality', 'script-binding quality_menu/video_formats_toggle')
```
Allows menus to use `spinner` as an item icon, which will display a rotating spinner. Along with a no-op command on an item and `keep_open=true`, this can be used to display placeholder menus/items that are still loading.
Extracts spinner from `BufferingIndicator` into `ass:spinner()` utility.
Allows toggling one or multiple elements at the same time. Example:
```
script-message-to uosc toggle-elements timeline,speed
```
BREAKING: Removes `toggle-timeline`, `toggle-volume`, and `toggle-top-bar` script bindings.
Previously, all of the `peek-{element}` commands such as `peek-ui` would force the elements' visibility only until pressed again, OR MOUSE MOVED. This was sometimes annoying (small mouse movements would reset it), and limiting, for no really good reason.
With this, the commands are renamed to `toggle-{x}`, and toggle each element's permanent `min_visibility` between `0` and `1`.
ref #48
With this, the codebase is mostly typed (as much as sumneko's type checking allows), and finally go-to-definition-able.
This refactor changed or touched more than 90% of the codebase, so here's just the most notable changes I can recall:
Menu implementation is now way more robust, and supports:
- live menu updates
- opening submenus allows navigating to parent menus
- items icons and bold & italic styling
- keeping menu open after selecting the item
- peeking submenus
- and a lot of other small tweaks
The menu input data structure changed. It no longer accepts `active_index` and `selected_index`, instead, each item can now have `active` or `selected` property.
And I'm sure there's a lot I'm forgetting to mention, but it's midnight here T.T
closes#144, ref #171, closes#176
Adds `load-audio`, `load-video` menus, adds load file item to all track selection menus, makes disabled subtitle item a bit more prominent and styled appropriately.
Notable addition: new `muted` property for menu items which makes the title half the opacity.
closes#169, closes#170
Also includes a lot of refactoring around codebase to make it work as needed.
Notable addition: new `items` command that displays playlist if any, or open-file otherwise.
ref #167, closes#71
Added `type`, `active_index`, `selected_index` props, menu toggling, and fixed table command values being passed to `mp.command()` instead of `mp.commandv()`.
closes#142, closes#143