mirror of https://github.com/mpv-player/mpv
osc.lua: unify animation reset function (no-op)
This commit is contained in:
parent
c3a647ffee
commit
bc6dab6d92
|
@ -132,6 +132,12 @@ local is_december = os.date("*t").month == 12
|
||||||
-- Helperfunctions
|
-- Helperfunctions
|
||||||
--
|
--
|
||||||
|
|
||||||
|
function kill_animation()
|
||||||
|
state.anistart = nil
|
||||||
|
state.animation = nil
|
||||||
|
state.anitype = nil
|
||||||
|
end
|
||||||
|
|
||||||
function set_osd(res_x, res_y, text)
|
function set_osd(res_x, res_y, text)
|
||||||
if state.osd.res_x == res_x and
|
if state.osd.res_x == res_x and
|
||||||
state.osd.res_y == res_y and
|
state.osd.res_y == res_y and
|
||||||
|
@ -2339,14 +2345,10 @@ function render()
|
||||||
if (state.anitype == "out") then
|
if (state.anitype == "out") then
|
||||||
osc_visible(false)
|
osc_visible(false)
|
||||||
end
|
end
|
||||||
state.anistart = nil
|
kill_animation()
|
||||||
state.animation = nil
|
|
||||||
state.anitype = nil
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
state.anistart = nil
|
kill_animation()
|
||||||
state.animation = nil
|
|
||||||
state.anitype = nil
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--mouse show/hide area
|
--mouse show/hide area
|
||||||
|
|
Loading…
Reference in New Issue