Allow negative numbers for timeline_step
The restriction of only allowing positive numbers for `timeline_step` has been lifted, allowing users to set negative numbers if they want to reverse the scrolling direction of timeline seeking. This was already possible for speed and volume.
This commit is contained in:

committed by
Tomas Klaen

parent
4eb93bc25b
commit
b1c0466c11
4
uosc.lua
4
uosc.lua
@@ -2400,10 +2400,10 @@ elements:add('timeline', Element.new({
|
|||||||
if this.pressed then this:set_from_cursor() end
|
if this.pressed then this:set_from_cursor() end
|
||||||
end,
|
end,
|
||||||
on_wheel_up = function(this)
|
on_wheel_up = function(this)
|
||||||
if options.timeline_step > 0 then mp.commandv('seek', -options.timeline_step) end
|
mp.commandv('seek', -options.timeline_step)
|
||||||
end,
|
end,
|
||||||
on_wheel_down = function(this)
|
on_wheel_down = function(this)
|
||||||
if options.timeline_step > 0 then mp.commandv('seek', options.timeline_step) end
|
mp.commandv('seek', options.timeline_step)
|
||||||
end,
|
end,
|
||||||
render = render_timeline,
|
render = render_timeline,
|
||||||
}))
|
}))
|
||||||
|
Reference in New Issue
Block a user