diff options
author | Ricardo Constantino <wiiaboo@gmail.com> | 2017-04-18 00:13:35 +0100 |
---|---|---|
committer | Ricardo Constantino <wiiaboo@gmail.com> | 2017-04-19 20:18:23 +0100 |
commit | 05c8707a0b659a4108ea328dc1de96a646dbdd01 (patch) | |
tree | d96695c161550318c9e69ccffc510362a1378e9e /player | |
parent | a047e636ab3240d2ad3f1f89e3785c59172b6dfc (diff) | |
download | mpv-05c8707a0b659a4108ea328dc1de96a646dbdd01.tar.bz2 mpv-05c8707a0b659a4108ea328dc1de96a646dbdd01.tar.xz |
osc: add volume icons to osd font and use them
Glyphs taken and based on U+1F507 to U+1F50A from Symbola, which
is available under public domain: http://users.teilar.gr/~g1951d/
Diffstat (limited to 'player')
-rw-r--r-- | player/lua/osc.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua index ea77c1dfe0..c0fcf1e953 100644 --- a/player/lua/osc.lua +++ b/player/lua/osc.lua @@ -1837,11 +1837,12 @@ function osc_init() ne.content = function() local volume = mp.get_property_number("volume", 0) local mute = mp.get_property_native("mute") - local volicon = {"🔈", "🔉", "🔊"} + local volicon = {"\238\132\139", "\238\132\140", + "\238\132\141", "\238\132\142"} if volume == 0 or mute then - return "🔇" + return "\238\132\138" else - return volicon[math.min(3,math.ceil(volume / (100/3)))] + return volicon[math.min(4,math.ceil(volume / (100/3)))] end end ne.eventresponder["mouse_btn0_up"] = |