WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   ItemRefTooltip is not fired (https://www.wowinterface.com/forums/showthread.php?t=59200)

Platine 08-26-22 08:55 AM

ItemRefTooltip is not fired
 
Please move this thread to the Lua/XML Help section.

Hello, if I hover over an item in the backpack with the mouse, its description will be displayed in the GameTooltip frame. If they additionally press the Shift key, the description Currently Equipped will be displayed in the ItemRefTooltip frame.



I would like to capture the moment of the ItemRefTooltip frame is showing, but something fails:

Code:

ItemRefTooltip:HookScript("OnTooltipSetItem", function(self, ...)
  print("ItemRefTooltip1");     
end );     

ItemRefTooltip:HookScript("OnShow", function(self)
  print("ItemRefTooltip2");     
end );     

ItemRefTooltip:HookScript("OnEnter", function(self)
  print("ItemRefTooltip3");     
end );     

ItemRefTooltip:HookScript("OnLeave", function(self)
  print("ItemRefTooltip4");
end );

The message is not displayed after showing the frame with Currently Equipped.

SDPhantom 08-26-22 12:53 PM

ItemRefTooltip only handles chat links. The comparison tooltips you're looking for are ShoppingTooltip1 and ShoppingTooltip2.

Platine 08-27-22 12:27 AM

So how to detect the opening of the Currently Equipped frame?
I found such a solution and it works.
Quote:

hooksecurefunc("GameTooltip_ShowCompareItem",function() print("You pressed Shift on Item Button"); end );
And then accessing Currently Equipped frames through ShopingTooltip1,2,3 objects.
-


All times are GMT -6. The time now is 03:17 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI