View Single Post
08/29/19, 03:34 AM   #4
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
This code should be run at your event_add_on_loaded callback function or only once at event_player_activated.

My example code will "hook" the normal inventory, but not the trading house list! So you'd need to find the appropriate listView of the trading house.
Everytime a row is created it will call the code at
--Do your stuff here
so you'd need to create your texture/control here, anchor itt to rowControl properly and show whatever you want in it.
It will also be called if you scroll in the listView.

So you do not need to do stuff as the trading house opens or closes or shows the list as the hook will handle this. But you need to find the correct listView of the trading house sell panel! As my code is for your normal inventory, if you press I. You can try this firstt o see how it works maybe.

Maybe check with zgoo addon the variable TRADING_HOUSE or similar if you have something like TRADING_HOUSE.buyPanel.inventory.list or similar. I never used the trading house stuff.

Check the base code for the trading house in the esoui source code to get the global variable of it, if it's not TRADING_HOUSE:
https://github.com/esoui/esoui/tree/...e/tradinghouse

From what I can see there the global variable would be either TRADING_HOUSE_SEARCH or TRADING_HOUSE

If you checkt he file tradinghouse_keyboard.lua you'll find a local list = self.searchResultsList
So the variable searchResultsList should be somewhere below TRADING_HOUSE I guess and would be the list you need to use for my example code.
Exchange the line local listView = PLAYER_INVENTORY.inventories[INVENTORY_BAGPACK].listView
with it like
local listView = TRADING_HOUSE.whatEver.searchResultsList

Last edited by Baertram : 08/29/19 at 03:36 AM.
  Reply With Quote