8bf5548 added mouse support to the console's select menu, so open it from OSC buttons. Left click on the title opens the playlist selector and showing the stats is moved to right click. Right click on chapter buttons opens the chapter selector. Left click on track buttons opens the track selectors because seeing which track you're selecting beforehand is useful. Fixes #10621.
Showing the changes to player/lua/osc.lua (1 of 2 files). Show all
Unified · Split
| @@ -1703,7 +1703,7 @@ local function osc_init() · 1702 unmodified lines | ||
| 1703 | 1703 | end |
| 1704 | 1704 | |
| 1705 | 1705 | ne.eventresponder["mbtn_left_up"] = function () |
| 1706 | − mp.command("script-binding stats/display-page-5") | |
| 1706 | + mp.command("script-binding select/select-playlist; script-message-to osc osc-hide") | |
| 1707 | 1707 | end |
| 1708 | 1708 | ne.eventresponder["shift+mbtn_left_up"] = function () |
| 1709 | 1709 | mp.command("show-text ${filename}") |
| @@ -1728,8 +1728,9 @@ local function osc_init() · 18 unmodified lines | ||
| 1728 | 1728 | end |
| 1729 | 1729 | ne.eventresponder["shift+mbtn_left_up"] = |
| 1730 | 1730 | function () mp.command("show-text ${playlist} 3000") end |
| 1731 | − ne.eventresponder["mbtn_right_up"] = | |
| 1732 | − function () mp.command("show-text ${playlist} 3000") end | |
| 1731 | + ne.eventresponder["mbtn_right_up"] = function () | |
| 1732 | + mp.command("show-text ${playlist} 3000") | |
| 1733 | + end | |
| 1733 | 1734 | |
| 1734 | 1735 | --next |
| 1735 | 1736 | ne = new_element("pl_next", "button") |
| @@ -1745,8 +1746,9 @@ local function osc_init() · 9 unmodified lines | ||
| 1745 | 1746 | end |
| 1746 | 1747 | ne.eventresponder["shift+mbtn_left_up"] = |
| 1747 | 1748 | function () mp.command("show-text ${playlist} 3000") end |
| 1748 | − ne.eventresponder["mbtn_right_up"] = | |
| 1749 | − function () mp.command("show-text ${playlist} 3000") end | |
| 1749 | + ne.eventresponder["mbtn_right_up"] = function () | |
| 1750 | + mp.command("show-text ${playlist} 3000") | |
| 1751 | + end | |
| 1750 | 1752 | |
| 1751 | 1753 | |
| 1752 | 1754 | -- big buttons |
| @@ -1806,8 +1808,9 @@ local function osc_init() · 53 unmodified lines | ||
| 1806 | 1808 | end |
| 1807 | 1809 | ne.eventresponder["shift+mbtn_left_up"] = |
| 1808 | 1810 | function () mp.command("show-text ${chapter-list} 3000") end |
| 1809 | − ne.eventresponder["mbtn_right_up"] = | |
| 1810 | − function () mp.command("show-text ${chapter-list} 3000") end | |
| 1811 | + ne.eventresponder["mbtn_right_up"] = function () | |
| 1812 | + mp.command("script-binding select/select-chapter; script-message-to osc osc-hide") | |
| 1813 | + end | |
| 1811 | 1814 | |
| 1812 | 1815 | --ch_next |
| 1813 | 1816 | ne = new_element("ch_next", "button") |
| @@ -1823,8 +1826,9 @@ local function osc_init() · 9 unmodified lines | ||
| 1823 | 1826 | end |
| 1824 | 1827 | ne.eventresponder["shift+mbtn_left_up"] = |
| 1825 | 1828 | function () mp.command("show-text ${chapter-list} 3000") end |
| 1826 | − ne.eventresponder["mbtn_right_up"] = | |
| 1827 | − function () mp.command("show-text ${chapter-list} 3000") end | |
| 1829 | + ne.eventresponder["mbtn_right_up"] = function () | |
| 1830 | + mp.command("script-binding select/select-chapter; script-message-to osc osc-hide") | |
| 1831 | + end | |
| 1828 | 1832 | |
| 1829 | 1833 | -- |
| 1830 | 1834 | update_tracklist() |
| @@ -1837,12 +1841,13 @@ local function osc_init() · 6 unmodified lines | ||
| 1837 | 1841 | return ("\238\132\134" .. osc_styles.smallButtonsLlabel .. " " .. |
| 1838 | 1842 | (mp.get_property_native("aid") or "-") .. "/" .. audio_track_count) |
| 1839 | 1843 | end |
| 1840 | − ne.eventresponder["mbtn_left_up"] = | |
| 1841 | − function () mp.command("cycle audio") end | |
| 1842 | − ne.eventresponder["mbtn_right_up"] = | |
| 1843 | − function () mp.command("cycle audio down") end | |
| 1844 | + ne.eventresponder["mbtn_left_up"] = function () | |
| 1845 | + mp.command("script-binding select/select-aid; script-message-to osc osc-hide") | |
| 1846 | + end | |
| 1844 | 1847 | ne.eventresponder["shift+mbtn_left_down"] = |
| 1845 | 1848 | function () mp.command("show-text ${track-list/audio} 2000") end |
| 1849 | + ne.eventresponder["shift+mbtn_right_up"] = | |
| 1850 | + function () mp.command("show-text ${track-list/sub} 2000") end | |
| 1846 | 1851 | |
| 1847 | 1852 | if user_opts.scrollcontrols then |
| 1848 | 1853 | ne.eventresponder["wheel_down_press"] = |
| @@ -1859,12 +1864,13 @@ local function osc_init() · 10 unmodified lines | ||
| 1859 | 1864 | return ("\238\132\135" .. osc_styles.smallButtonsLlabel .. " " .. |
| 1860 | 1865 | (mp.get_property_native("sid") or "-") .. "/" .. sub_track_count) |
| 1861 | 1866 | end |
| 1862 | − ne.eventresponder["mbtn_left_up"] = | |
| 1863 | − function () mp.command("cycle sub") end | |
| 1864 | − ne.eventresponder["mbtn_right_up"] = | |
| 1865 | − function () mp.command("cycle sub down") end | |
| 1867 | + ne.eventresponder["mbtn_left_up"] = function () | |
| 1868 | + mp.command("script-binding select/select-sid; script-message-to osc osc-hide") | |
| 1869 | + end | |
| 1866 | 1870 | ne.eventresponder["shift+mbtn_left_down"] = |
| 1867 | 1871 | function () mp.command("show-text ${track-list/sub} 2000") end |
| 1872 | + ne.eventresponder["shift+mbtn_right_up"] = | |
| 1873 | + function () mp.command("show-text ${track-list/sub} 2000") end | |
| 1868 | 1874 | |
| 1869 | 1875 | if user_opts.scrollcontrols then |
| 1870 | 1876 | ne.eventresponder["wheel_down_press"] = |
| @@ -2074,6 +2080,9 @@ local function osc_init() · 203 unmodified lines | ||
| 2074 | 2080 | end |
| 2075 | 2081 | ne.eventresponder["mbtn_left_up"] = |
| 2076 | 2082 | function () mp.commandv("cycle", "mute") end |
| 2083 | + ne.eventresponder["mbtn_right_up"] = function () | |
| 2084 | + mp.command("script-binding select/select-audio-device; script-message-to osc osc-hide") | |
| 2085 | + end | |
| 2077 | 2086 | |
| 2078 | 2087 | if user_opts.scrollcontrols then |
| 2079 | 2088 | ne.eventresponder["wheel_up_press"] = |