View Single Post
09-25-20, 02:57 PM   #2
Vrul
A Scalebane Royal Guard
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 404
If the GameTooltip is showing for an item then the mouse is still over that item so you can use GetMouseFocus:
Code:
local focus = GetMouseFocus()
if not (focus:GetName() or ""):match("ContainerFrame%d+Item%d+") then return end
local bagID, slotID = focus:GetParent():GetID(), focus:GetID()
-- Do something with bagID, slotID
  Reply With Quote