* feat: added `disable_elements` option and `disable-elements` script message
Allows disabling elements and various indicators by adding their IDs to the list:
```conf
disable_elements=timeline,audio_indicator
```
Also includes a new script message listener `disable-elements`, that does the same thing:
```lua
local id = mp.get_script_name()
mp.commandv('script-message-to', 'uosc', 'disable-elements', id, 'timeline,audio_indicator')
```
It'll register what elements each script wants disabled. The element will be enabled only when it is not disabled by neither user nor any script.
To cancel or re-enable the elements, just pass an empty list:
```lua
mp.commandv('script-message-to', 'uosc', 'disable-elements', id, '')
```
ref #686, closes#592
* feat: support for creating menu titles and separators in `input.conf`
When defining menu items in `input.conf`, it is now possible to add an un-selectable+muted+italic menu items by using `#` as key, and omitting the command:
```
# #! Section > Title
```
You can also add a separator between previous and next item by using `---` as title:
```
# #! Section > ---
```
closes#69
Left Page Up/Down as the animation is useful there (gives a sense of where the menu has animated from & to), but up/down/home/end just work better when instant.
These options have been removed:
```
timeline_opacity
timeline_chapters_opacity
volume_opacity
speed_opacity
menu_opacity
menu_parent_opacity
top_bar_title_opacity
window_border_opacity
curtain_opacity
```
and replaced with one comma delimited `opacity` list to override all of the above and some new default opacity values.
Example:
```
opacity=timeline=0.5,title=0.5
```
List of opacity values available for override and their current defaults:
```
timeline=.9
position=1 # timeline progress or line
chapters=0.8
slider=0.9 # background of all sliders, such as volume
slider_gauge=1 # value bar of all sliders
speed=0.6
menu=1
submenu=0.4
border=1 # window border
title=1 # window title
tooltip=1 # tooltip background
thumbnail=1 # thumbnail border
curtain=0.5
```
closes#584, closes#636, closes#675
* feat!: reworked config options for fullscreen scale adjustments
Removed options:
```
timeline_size_fullscreen
controls_size_fullscreen
volume_size_fullscreen
menu_item_height_fullscreen
menu_min_width_fullscreen
top_bar_size_fullscreen
```
Additionally, `ui_scale` has been renamed to `scale`.
The scaling can now be controlled by these two new options:
```
scale=1
scale_fullscreen=1.3
```
closes#543
* feat: reworked timeline progress mode
Config options:
```
timeline_line_width_fullscreen=3
timeline_line_width_minimized_scale=10
timeline_size_min=2
timeline_size_max=40
timeline_size_min_fullscreen=0
timeline_size_max_fullscreen=60
timeline_start_hidden=no
```
have been replaced with:
```
timeline_size=40
timeline_size_fullscreen=60
progress=windowed
progress_size=2
progress_line_width=20
```
This simplifies stuff a bunch, and enables timeline's progress mode to be togglable at all times. Previously you could only toggle when it was configured to be visible in current context.
closes#630
`search_submenus` makes uosc's internal search handler (when no `on_search` callback is defined) look into submenus as well, effectively flattening the menu for the duration of the search.
- `open-menu` now only opens the menu, while closing any existing one first, even if it has the same `type`.
- `update-menu` will only update a currently opened menu of the same type. If no menu is open, or current menu's type is different, it doesn't do anything.
- `close-menu [type]` can be used to close any currently opened menu when called without a `[type]` argument, or only a menu of `[type]` type.
- uosc now keeps track of a currently opened menu type on the `user-data/uosc/menu/type` property, accessible via `mp.get_property_native('user-data/uosc/menu/type')`. This property is `nil` if no uosc menu is opened.
This is to achieve a predictable and granular control of menus with no implicit magic going on in the background.
The main difference is that `open-menu` can no longer be used to toggle the menu. You have to implement toggling manually by calling `open-menu` or `close-menu [type]` when appropriate. You can check if your menu is still opened either by getting or observing the `user-data/uosc/menu/type` property, or using the `on_close` menu callback.
Each (sub)menu can now enable palette mode by setting its `palette` property to `true`.
In this mode:
- search input is always visible, doesn't have to be enabled, and can't be disabled
- `title` is used as input placeholder while search is empty
- `search_suggestion` can be used to pre-populate search input with an initial query
- simpler & less cluttered design without textures
- search icon
- clickable icon for submittable searches
- search cursor
- localized placeholders
- clicking empty title now does nothing instead of closing the menu
I didn't like the name from the very beginning, but I couldn't think of
something better. Ever since I realized that such characters are called
"initials", this name bothered me every time I saw it.
Currently the text does not advance to the left when spaces are entered,
which must mean that libass trims any trailing spaces.
Appending a ZWNBSP at the end prevents any trimming.
This is currently limited to Mac & Linux only, since on Windows we have no way of telling a file is hidden (`file_info()` doesn't expose this information).
closes#647