summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.lua18
1 files changed, 12 insertions, 6 deletions
diff --git a/main.lua b/main.lua
index cfb4e14..b3d9d9e 100644
--- a/main.lua
+++ b/main.lua
@@ -16,7 +16,7 @@ local osd_cursor_glyph = '{\\p1\\pbo' .. math.floor(font_size / 5) .. '}' ..
' 0 ' .. font_size .. '{\\p0}'
local osd_bg = mp.create_osd_overlay('ass-events')
osd_bg.z = -1
-osd_bg.data = '{\\alpha&H50&\\c&H&\\pos(0,0)}' ..
+osd_bg.data = '{\\alpha&H44&\\c&H&\\pos(0,0)}' ..
'{\\p1}m 0 0 l 9999 0 9999 720 0 720{\\p0}'
local categories = {}
@@ -76,20 +76,26 @@ local function update_osd()
menu.page_pos + osd_menu_lines() - 1, #menu.options) do
local opt = menu.options[i]
local str = opt.name
+ local col
+ local icons = ''
if opt.type == 'category' then
str = '[' .. str .. ']'
+ col = '99DDFF'
elseif opt.stream_id == playing_stream_id then
- str = '▶ ' .. str
+ icons = icons .. '{\\c&HFF6633&&}\226\143\186{\\c} '
end
if i == menu.cursor_pos and not menu.search_active then
- str = '{\\c&HFF00&}› ' .. str .. '{\\c}'
- elseif opt.type == 'category' then
- str = '{\\c&H99DDFF&}' .. str .. '{\\c}'
+ col = 'FF00'
+ icons = '{\\c&H' .. col .. '&}›{\\c} ' .. icons
end
- out[#out+1] = str
+ if col then
+ str = '{\\c&H' .. col .. '&}' .. str .. '{\\c}'
+ end
+
+ out[#out+1] = icons .. str
end
-- \q2 disables line wrapping