From 9863bc6b8eed0ca90f58ecfae52d4ff72702cdd5 Mon Sep 17 00:00:00 2001 From: Ren Tatsumoto Date: Sun, 6 Sep 2020 19:01:32 +0300 Subject: [PATCH] warn with osd_message --- videoclip.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/videoclip.lua b/videoclip.lua index 7de293a..896e1ef 100644 --- a/videoclip.lua +++ b/videoclip.lua @@ -235,7 +235,7 @@ menu.set_time_sub = function(property) local time_pos = mp.get_property_number(string.format("sub-%s", property)) if time_pos == nil then - menu.update("Warning: No subtitles visible.") + mp.osd_message("Warning: No subtitles visible.", 2) return end @@ -243,7 +243,7 @@ menu.set_time_sub = function(property) menu.update() end -menu.update = function(message) +menu.update = function() local osd = OSD:new():size(config.font_size):align(4) osd:bold('Clip creator'):newline():newline() @@ -262,10 +262,6 @@ menu.update = function(message) osd:tab():bold('o: '):append('Open `streamable.com`'):newline() osd:tab():bold('ESC: '):append('Close'):newline() - if message ~= nil then - osd:newline():append(message):newline() - end - osd:draw() end