From ac31bfca05ea8d18480b3f7c0d5a67262fde270c Mon Sep 17 00:00:00 2001 From: Etoh Date: Thu, 28 Dec 2017 15:54:31 +0000 Subject: [PATCH] Prevent mpv chat scrolling text from getting too low --- resources/syncplayintf.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/syncplayintf.lua b/resources/syncplayintf.lua index 6508193..a148a3b 100644 --- a/resources/syncplayintf.lua +++ b/resources/syncplayintf.lua @@ -18,6 +18,7 @@ local MOOD_NEUTRAL = 0 local MOOD_BAD = 1 local MOOD_GOOD = 2 local WORDWRAPIFY_MAGICWORD = "{\\\\fscx0} {\\\\fscx100}" +local SCROLLING_ADDITIONAL_BOTTOM_MARGIN = 75 local default_oscvisibility_state = "never" local ALPHA_WARNING_TEXT_COLOUR = "FF00FF" -- RBG @@ -904,7 +905,7 @@ function set_syncplayintf_options(input) --mp.command('print-text "'..option.."="..tostring(value).." - "..valueType..'"') end chat_format = get_output_style() - local vertical_output_area = CANVAS_HEIGHT-(opts['chatTopMargin']+opts['chatBottomMargin']+(opts['chatOutputFontSize']+opts['scrollingFirstRowOffset'])) + local vertical_output_area = CANVAS_HEIGHT-(opts['chatTopMargin']+opts['chatBottomMargin']+(opts['chatOutputFontSize']*opts['scrollingFirstRowOffset'])+SCROLLING_ADDITIONAL_BOTTOM_MARGIN) max_scrolling_rows = math.floor(vertical_output_area/opts['chatOutputFontSize']) local user_opts = { visibility = "auto", } opt.read_options(user_opts, "osc")