mirror of
https://github.com/ksyasuda/mpv-youtube-queue.git
synced 2024-11-22 03:19:54 -08:00
add color reset variable
This commit is contained in:
parent
c767c02262
commit
f9ac4b6d18
@ -47,7 +47,8 @@ local colors = {
|
|||||||
error = "676EFF",
|
error = "676EFF",
|
||||||
text = "BFBFBF",
|
text = "BFBFBF",
|
||||||
selected_color = "F993BD",
|
selected_color = "F993BD",
|
||||||
cursor = "FDE98B"
|
cursor = "FDE98B",
|
||||||
|
reset = "{\\c&BFBFBF&}"
|
||||||
}
|
}
|
||||||
|
|
||||||
mp.options.read_options(options, "mpv-youtube-queue")
|
mp.options.read_options(options, "mpv-youtube-queue")
|
||||||
@ -203,22 +204,15 @@ function YouTubeQueue.print_queue(duration)
|
|||||||
for i = start_index, end_index do
|
for i = start_index, end_index do
|
||||||
local prefix = (i == selected_index) and styleOn .. "{\\c&" ..
|
local prefix = (i == selected_index) and styleOn .. "{\\c&" ..
|
||||||
colors.cursor .. "&}" .. options.cursor_icon ..
|
colors.cursor .. "&}" .. options.cursor_icon ..
|
||||||
" " .. "{\\c&" .. colors.text .. "&}" .. styleOff or
|
" " .. colors.reset .. styleOff or " "
|
||||||
" "
|
|
||||||
if i == current_index then
|
if i == current_index then
|
||||||
message = message .. prefix .. styleOn .. "{\b1\\c&" ..
|
message = message .. prefix .. styleOn .. "{\\b1\\c&" ..
|
||||||
colors.selected_color .. "&}" .. i .. ". " ..
|
colors.selected_color .. "&}" .. i .. ". " ..
|
||||||
video_queue[i].name .. "{\\c&" .. colors.text ..
|
video_queue[i].name .. "{\\b0}" .. colors.reset ..
|
||||||
"&\b0}" .. styleOff .. "\n"
|
styleOff .. "\n"
|
||||||
elseif i == 2 then
|
|
||||||
message =
|
|
||||||
message .. prefix .. styleOn .. "{\\c&" .. colors.text ..
|
|
||||||
"&\b0}" .. styleOff .. i .. ". " .. video_queue[i].name ..
|
|
||||||
"\n"
|
|
||||||
else
|
else
|
||||||
message =
|
message = message .. prefix .. styleOn .. colors.reset ..
|
||||||
message .. prefix .. styleOn .. "{\\c&" .. colors.text ..
|
styleOff .. i .. ". " .. video_queue[i].name ..
|
||||||
"&\b0}" .. styleOff .. i .. ". " .. video_queue[i].name ..
|
|
||||||
"\n"
|
"\n"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user