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
The documentation cautions against using shared script properties, but
console.lua relies on the margin to not overlap with the bottom bar from
the default osc. Without support for that in uosc, using the console
was always annoying.
Now it also doesn't overlap with the uosc timeline.
The script property gets updated on render whenever at least one of of
the margins changed.
Chapters that end a chapter range and are matched by something other
then `.*` are now not shown when hovering over that chapter,
unless that chapter is also used to start another range.
With a step size of 1 it was possible to set volume to -1.
mpv permits setting volume to -1 for legacy reasons, so cap it in the ui.
There was a `set_from_cursor` method for setting volume in the speed element.
Probably got copied there at some point by accident.
This is a media player after all, it makes sense to be able to control it's volume even when playing files with no audio. We might implement image viewing mode in the future, but for now, this stays enabled.
closes#154
When clicking at a pixel, one would expect to click at the middle of
that pixel instead of the left edge of that pixel.
Add 0.5 to the cursor position to be in the middle.