View Single Post
08/28/19, 02:10 PM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,973
Hello,

the lists normally are some ZO_SortScrollList controls. If you check the source code of them in the esoui source code you get a basic understanding for them (I hope).
Or maybr the forums here or the wiki got some info about them as well.

Normally those lists got a setup function for each "row" of the list which you can use to add controls to them.
Addons like ItemSaver also got some hooks where they add controls to lists if the rows get created:

Lua Code:
  1. local listView = PLAYER_INVENTORY.inventories[INVENTORY_BAGPACK].listView
  2.         if listView and listView.dataTypes and listView.dataTypes[1] then
  3.             local hookedFunctions = listView.dataTypes[1].setupCallback
  4.  
  5.             listView.dataTypes[1].setupCallback =
  6.             function(rowControl, slot)
  7.                 --Call original function of the row
  8.                 hookedFunctions(rowControl, slot)
  9.  
  10.                 --Do not execute if horse is changed
  11.                 if SCENE_MANAGER:GetCurrentScene() ~= STABLES_SCENE then
  12.                    --Do your stuff here
  13.                 end
  14.             end
  15.         end

The prices should be either in the rowControl.dataEntry.data table or there might be API functions (check the API documentation inside the Wiki for current API 100028) which are able to be used with bagId and slotIndex, or itemLink, of the rowControl (the item).
  Reply With Quote