feat: added show-submenu-blurred message listener

closes #441
This commit is contained in:
tomasklaen
2023-01-30 10:13:06 +01:00
parent b32ae2abaf
commit 9ebc600d37
2 changed files with 5 additions and 2 deletions

View File

@@ -381,9 +381,9 @@ end)
mp.commandv('script-message-to', 'uosc', 'get-version', mp.get_script_name())
```
### `show-submenu <menu_id>`
### `show-submenu <menu_id>`, `show-submenu-blurred <menu_id>`
Opens one of the submenus defined in `input.conf` (read on how to build those in the Menu documentation above).
Opens one of the submenus defined in `input.conf` (read on how to build those in the Menu documentation above). To prevent 1st item being preselected, use `show-submenu-blurred` instead.
Parameters

View File

@@ -1085,6 +1085,9 @@ end)
--[[ MESSAGE HANDLERS ]]
mp.register_script_message('show-submenu', function(id) toggle_menu_with_items({submenu = id}) end)
mp.register_script_message('show-submenu-blurred', function(id)
toggle_menu_with_items({submenu = id, mouse_nav = true})
end)
mp.register_script_message('get-version', function(script)
mp.commandv('script-message-to', script, 'uosc-version', config.version)
end)