From aed7c848407a472ccc63337b3bd7cef97defe8e4 Mon Sep 17 00:00:00 2001 From: Teoh Han Hui Date: Fri, 19 Jun 2015 19:33:06 +0800 Subject: osc: time display configuration options Total time and ms --- DOCS/man/osc.rst | 8 ++++++++ player/lua/osc.lua | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/DOCS/man/osc.rst b/DOCS/man/osc.rst index b6e0f78bdc..f4f8d66496 100644 --- a/DOCS/man/osc.rst +++ b/DOCS/man/osc.rst @@ -235,6 +235,14 @@ Configurable Options | Default: slider | Sets the style of the seekbar, slider (diamond marker) or bar (fill) +``timetotal`` + | Default: no + | Show total time instead of time remaining + +``timems`` + | Default: no + | Display timecodes with milliseconds + Script Commands ~~~~~~~~~~~~~~~ diff --git a/player/lua/osc.lua b/player/lua/osc.lua index 4e373da74b..09ca0eb5e9 100644 --- a/player/lua/osc.lua +++ b/player/lua/osc.lua @@ -30,6 +30,8 @@ local user_opts = { -- functions that depend on it) layout = "box", seekbarstyle = "slider", -- slider (diamond marker) or bar (fill) + timetotal = false, -- display total time instead of remaining time? + timems = false, -- display timecodes with milliseconds? } -- read options from config and command-line @@ -65,8 +67,8 @@ local state = { mouse_down_counter = 0, -- used for softrepeat active_element = nil, -- nil = none, 0 = background, 1+ = see elements[] active_event_source = nil, -- the "button" that issued the current event - rightTC_trem = true, -- if the right timcode should display total or remaining time - tc_ms = false, -- Should the timecodes display their time with milliseconds + rightTC_trem = not user_opts.timetotal, -- if the right timecode should display total or remaining time + tc_ms = user_opts.timems, -- Should the timecodes display their time with milliseconds mp_screen_sizeX, mp_screen_sizeY, -- last screen-resolution, to detect resolution changes to issue reINITs initREQ = false, -- is a re-init request pending? last_mouseX, last_mouseY, -- last mouse position, to detect siginificant mouse movement -- cgit v1.2.3