From fa0322b236764cd2d6799f5d8b952a8dc4cba58e Mon Sep 17 00:00:00 2001 From: Ren Tatsumoto Date: Sun, 6 Sep 2020 18:51:36 +0300 Subject: [PATCH] align menu middle-left --- videoclip.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/videoclip.lua b/videoclip.lua index 162a41c..8d2b058 100644 --- a/videoclip.lua +++ b/videoclip.lua @@ -244,7 +244,8 @@ menu.set_time_sub = function(property) end menu.update = function(message) - local osd = OSD:new():size(config.font_size):bold('Video clip creator'):newline():newline() + local osd = OSD:new():size(config.font_size):align(4) + osd:bold('Clip creator'):newline():newline() osd:bold('Start time: '):append(human_readable_time(menu.timings['start'])):newline() osd:bold('End time: '):append(human_readable_time(menu.timings['end'])):newline() @@ -314,6 +315,10 @@ function OSD:size(size) return self:append('{\\fs' .. size .. '}') end +function OSD:align(number) + return self:append('{\\an' .. number .. '}') +end + function OSD:draw() overlay.data = self.text overlay:update()