As per Samillion's suggestion, reduce the contrast between separators
and the background to match other context menus. Using the already
defined disabled_color works for this and seems to be what GTK and Qt
do at a glance.
When a character in an item's title is preceded by &, underline it and
activate the item when pressing the character.
Cycling between multiple items with the same hint is not supported.
&& escapes & so it works like the Windows context menu.
Hints after &&&, or greater odd numbers of &, are not supported since
Lua patterns don't support {n,m} quantifiers.
Fix crashes that won't happen in regular usage:
- If you open the menu with an empty menu-data and use keybindings
- If you open the menu with menu-data only containing hidden items
- If you invoke script-message-to context_menu select with the menu
closed
This implements a ASS context menu to be used on platforms other than
Windows.
The select script message will allow selecting an item with a single
click when releasing a mouse button, like in native context menus. This
is mainly useful to cycle pause with one click.