mirror of
https://github.com/mpv-player/mpv
synced 2024-12-24 15:52:25 +00:00
osc: make transparency of background-box configurable
see boxalpha option
This commit is contained in:
parent
4a4d2155d8
commit
6e34322dec
@ -6,7 +6,7 @@ offer basic mouse-controllability. It is intended to make interaction easier
|
|||||||
for new users and to enable precise and direct seeking.
|
for new users and to enable precise and direct seeking.
|
||||||
|
|
||||||
The OSC is enabled by default if mpv was compiled with lua support. It can be
|
The OSC is enabled by default if mpv was compiled with lua support. It can be
|
||||||
disabled using ``--osc=no``.
|
disabled entirely using the ``--osc=no`` option.
|
||||||
|
|
||||||
Using the OSC
|
Using the OSC
|
||||||
-------------
|
-------------
|
||||||
@ -176,6 +176,10 @@ Configurable parameters
|
|||||||
| Default: 0
|
| Default: 0
|
||||||
| Horizontal alignment, -1 (left) to 1 (right)
|
| Horizontal alignment, -1 (left) to 1 (right)
|
||||||
|
|
||||||
|
``boxalpha``
|
||||||
|
| Default: 80
|
||||||
|
| Alpha of the background box, 0 (opaque) to 255 (fully transparent)
|
||||||
|
|
||||||
``hidetimeout``
|
``hidetimeout``
|
||||||
| Default: 500
|
| Default: 500
|
||||||
| Duration in ms until the OSC hides if no mouse movement, negative value
|
| Duration in ms until the OSC hides if no mouse movement, negative value
|
||||||
|
@ -18,6 +18,7 @@ local user_opts = {
|
|||||||
vidscale = true, -- scale the controller with the video?
|
vidscale = true, -- scale the controller with the video?
|
||||||
valign = 0.8, -- vertical alignment, -1 (top) to 1 (bottom)
|
valign = 0.8, -- vertical alignment, -1 (top) to 1 (bottom)
|
||||||
halign = 0, -- horizontal alignment, -1 (left) to 1 (right)
|
halign = 0, -- horizontal alignment, -1 (left) to 1 (right)
|
||||||
|
boxalpha = 80, -- alpha of the background box, 0 (opaque) to 255 (fully transparent)
|
||||||
hidetimeout = 500, -- duration in ms until the OSC hides if no mouse movement, negative value disables autohide
|
hidetimeout = 500, -- duration in ms until the OSC hides if no mouse movement, negative value disables autohide
|
||||||
fadeduration = 200, -- duration of fade out in ms, 0 = no fade
|
fadeduration = 200, -- duration of fade out in ms, 0 = no fade
|
||||||
deadzonesize = 0, -- size of deadzone
|
deadzonesize = 0, -- size of deadzone
|
||||||
@ -675,8 +676,8 @@ function osc_init()
|
|||||||
--
|
--
|
||||||
|
|
||||||
local metainfo = {}
|
local metainfo = {}
|
||||||
metainfo.alpha1 = 80
|
metainfo.alpha1 = user_opts.boxalpha
|
||||||
metainfo.alpha3 = 80
|
metainfo.alpha3 = user_opts.boxalpha
|
||||||
register_box(posX, posY, 5, osc_w, osc_h, osc_r, osc_styles.box, metainfo)
|
register_box(posX, posY, 5, osc_w, osc_h, osc_r, osc_styles.box, metainfo)
|
||||||
|
|
||||||
--
|
--
|
||||||
|
Loading…
Reference in New Issue
Block a user