View Single Post
08-26-22, 02:05 PM   #3
Benalish
A Flamescale Wyrmkin
 
Benalish's Avatar
Join Date: Dec 2012
Posts: 123
Tooltip is not displayed yet

Lua Code:
  1. local tooltip = f.tooltip
  2. tooltip:SetScript("OnEnter", function(self, button)
  3.     if (CursorHasItem() == false) then
  4.         GameTooltip:SetOwner(tooltip, "ANCHOR_CURSOR")
  5.         GameTooltip:AddLine(db.profile["Bars"][frm:GetID()][i].item)
  6.         GameTooltip:Show()
  7.         end
  8.     end
  9.     )
  10. tooltip:SetScript("OnLeave", function(self, button)
  11.     GameTooltip:Hide()
  12. end)
  13.  
  14. local function onReceive(self)
  15.     GameTooltip:Show()
  16.     local infoType, arg1, arg2 = GetCursorInfo()
  17.     if infoType=="item" then
  18.     local itemName, _, _, _, _, _, _, _, _, itemTexture = GetItemInfo(arg2)    
  19.     db.profile["Bars"][frm:GetID()][i].item = itemName 
  20.     ClearCursor()  
  21.     end
  22. end
  Reply With Quote