It still does not work:-(
I'm executing the following code once as I press a button from my addon.
The chat message "Found - textureControl" will be written to the chat, so the control was found.
It is mouse enabled and no error message is thrown anywhere. It just doesn#t do anything if I click the money part in the inventory (neither the text nor the graphic).
I tried it with both mouse buttons, enabling the context menu stuff, or (like shown below) commenting it out.
Lua Code:
local textureControl = WINDOW_MANAGER:GetControlByName("ZO_PlayerInventoryInfoBarMoney", "")
if textureControl ~= nil then
d("Found - textureControl")
textureControl:SetMouseEnabled(true)
-- Set onClicked handler for right mouse button at textures in popup dialog and show context menu
textureControl: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
Are you able to get it to work if you test it merlight?
Maybe a texture control got no OnClicked handler? Only a button got it?