fd
Some checks failed
smoke-mm / Install & smoke test mm --help (push) Has been cancelled
Some checks failed
smoke-mm / Install & smoke test mm --help (push) Has been cancelled
This commit is contained in:
@@ -145,6 +145,20 @@ function Controls:init_options()
|
||||
})
|
||||
table_assign(control, {element = element, sizing = 'static', scale = 1, ratio = 1})
|
||||
if badge then self:register_badge_updater(badge, element) end
|
||||
|
||||
-- Medeia integration: show the persisted store name in the tooltip.
|
||||
-- Triggered by a matching command string and backed by a mpv user-data prop.
|
||||
if type(params[2]) == 'string' and params[2]:find('medeia%-store%-picker', 1, true) then
|
||||
local store_prop = 'user-data/medeia-selected-store'
|
||||
local function update_store_tooltip()
|
||||
local v = mp.get_property(store_prop) or ''
|
||||
v = trim(tostring(v))
|
||||
element.tooltip = (v ~= '' and ('Store: ' .. v) or 'Store: (none)')
|
||||
request_render()
|
||||
end
|
||||
element:observe_mp_property(store_prop, function() update_store_tooltip() end)
|
||||
update_store_tooltip()
|
||||
end
|
||||
end
|
||||
elseif kind == 'cycle' then
|
||||
if #params ~= 3 then
|
||||
|
||||
Reference in New Issue
Block a user