It does not work :-( I can see the texture move a bit to the bottm (??) inside the popup dialog.
But nothing happens if I click it.
I tried several things, like disable the mouse button check, or simply add a text message onClicked.
Here is the code I used as the texture (control) is added to the list dialog at popup ZO_ListDialog1:
Code:
-- The current control is a texture at a popup dialog ZO_ListDialog1 (crafting station research popup e.g.)
if (string.find(parent:GetName(), "ZO_ListDialog1")) then
-- Set onClicked handler for right mouse button at textures in popup dialog and show context menu
control:SetHandler("OnClicked", function(control, button)
--if button == 1 then -- RMB==2, LMB==1
d("Clicked: " .. control:GetName())
ClearMenu()
AddMenuItem("quick brown", function() d("fox") end)
AddMenuItem("lazy", function() d("dog") end)
ShowMenu(control)
--end
end)
end
The only thing that happens if I click the texture is, that the texture moves a bit up again to the place where it is shown normally (without this extra source code).