Hey Baertram,
thanks for the detailed info!
I've tested this without zo_callLater but then the menu entry not appears
For the auction house I've got it woking with this code:
Lua Code:
function ESOFarmBuddy.TradingHouseContextMenu(searchResultSlot, button)
if button == MOUSE_BUTTON_INDEX_RIGHT then
local inventorySlot = ZO_InventorySlot_GetInventorySlotComponents(searchResultSlot)
local tradingHouseIndex = ZO_Inventory_GetSlotIndex(inventorySlot)
if tradingHouseIndex ~= nil then
local itemLink = GetTradingHouseSearchResultItemLink(tradingHouseIndex)
zo_callLater(
function()
AddCustomMenuItem(GetString(ESOFB_MENU_TRACK), function() ESOFarmBuddy.TrackItemFromLink(itemLink) end, MENU_ADD_OPTION_LABEL)
ShowMenu()
end
, 4)
end
end
end
SecurePostHook("ZO_TradingHouse_OnSearchResultClicked", ESOFarmBuddy.TradingHouseContextMenu)
It also works together with your WishList AddOn
Many thanks for your help Baertram
I've learned a lot about the UI in ESO.
Keldor