WoWInterface (
-   Lua/XML Help (
-   -   How to get user select of an item in a bag? (

GreenCoyote 04-21-20 11:11 AM

How to get user select of an item in a bag?
Hello all!
Then auction/trade/send mail/vendor/etc window(frame) is opened, if user pressing right mouse button on an item in his inventory action happens, like sell item to vendor, or post item to auction, or trade it to stranger etc.
How to do this in my addon? How to get bag+slot user selected item?
I tried to google it in different ways, but failed. Can someone help me with this?

elcius 04-21-20 03:42 PM

the code that handles item clicking can be found here, but that's probably not what you need, since you need to intercept the clicks on the button frames directly to avoid breaking stuff.

the easiest way to do it is to listen for a modified click, pre-hooking HandleModifiedItemClick shouldn't cause taint.
if you want to listen for simple raw clicks then it gets quite complicated, probably involving invisible secure overlay frames for every item button.

All times are GMT -6. The time now is 11:56 PM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI