|
| 1 | +CONTEXT MENU |
| 2 | +============ |
| 3 | + |
| 4 | +This script provides a context menu for platforms without integration with a |
| 5 | +native context menu. On these platforms, it can be disabled entirely using the |
| 6 | +``--load-context-menu=no`` option. On platforms where the integration is |
| 7 | +implemented, it is already disabled by default. |
| 8 | + |
| 9 | +Script messages |
| 10 | +--------------- |
| 11 | + |
| 12 | +``open`` |
| 13 | + Show the context menu. |
| 14 | + |
| 15 | +``select`` |
| 16 | + Select the focused item when there is one. |
| 17 | + |
| 18 | +Configuration |
| 19 | +------------- |
| 20 | + |
| 21 | +This script can be customized through a config file |
| 22 | +``script-opts/context_menu.conf`` placed in mpv's user directory and through |
| 23 | +the ``--script-opts`` command-line option. The configuration syntax is |
| 24 | +described in `mp.options functions`_. |
| 25 | + |
| 26 | +Configurable Options |
| 27 | +~~~~~~~~~~~~~~~~~~~~ |
| 28 | + |
| 29 | +``font_size`` |
| 30 | + Default: 20 |
| 31 | + |
| 32 | + The font size. |
| 33 | + |
| 34 | +``gap`` |
| 35 | + Default: 5 |
| 36 | + |
| 37 | + The gap between menu items. |
| 38 | + |
| 39 | +``padding_x`` |
| 40 | + Default: 10 |
| 41 | + |
| 42 | + The horizontal padding of the menu. |
| 43 | + |
| 44 | +``padding_y`` |
| 45 | + Default: 5 |
| 46 | + |
| 47 | + The vertical padding of the menu. |
| 48 | + |
| 49 | +``menu_outline_size`` |
| 50 | + Default: 0 |
| 51 | + |
| 52 | + The size of the menu's border. |
| 53 | + |
| 54 | +``menu_outline_color`` |
| 55 | + Default: ``#FFFFFF`` |
| 56 | + |
| 57 | + The color of the menu's border. |
| 58 | + |
| 59 | +``corner_radius`` |
| 60 | + Default: 8 |
| 61 | + |
| 62 | + The radius of the menu's corners. |
| 63 | + |
| 64 | +``scale_with_window`` |
| 65 | + Default: auto |
| 66 | + |
| 67 | + Whether to scale sizes with the window height. Can be ``yes``, ``no``, or |
| 68 | + ``auto``, which follows the value of ``--osd-scale-by-window``. |
| 69 | + |
| 70 | + When sizes aren't scaled with the window, they are scaled by |
| 71 | + ``display-hidpi-scale``. |
| 72 | + |
| 73 | +``focused_color`` |
| 74 | + Default: ``#222222`` |
| 75 | + |
| 76 | + The color of the focused item. |
| 77 | + |
| 78 | +``focused_back_color`` |
| 79 | + Default: ``#FFFFFF`` |
| 80 | + |
| 81 | + The background color of the focused item. |
| 82 | + |
| 83 | +``disabled_color`` |
| 84 | + Default: ``#555555`` |
| 85 | + |
| 86 | + The color of disabled items. |
| 87 | + |
| 88 | +``seconds_to_open_submenus`` |
| 89 | + Default: 0.2 |
| 90 | + |
| 91 | + The number of seconds to open submenus after the cursor enters items |
| 92 | + associated with one. |
| 93 | + |
| 94 | +``seconds_to_close_submenus`` |
| 95 | + Default: 0.2 |
| 96 | + |
| 97 | + The number of seconds to close submenus after the cursor enters a parent |
| 98 | + menu. |
0 commit comments