Thread Tools Display Modes
10-31-22, 04:32 AM   #1
A Cliff Giant
AddOn Author - Click to view addons
Join Date: Dec 2010
Posts: 72
Question Dragonflight : BuffButton : GameTooltips

In the patch 10.0.0 the handling of the BuffButtonX buttons has changed. When you hover the mouse over an aura button - it is not possible to get the name of this button. Always returns nil.

GameTooltip:HookScript('OnShow', function(self, ...)
   print("The mouse is over " .. GetMouseFocus():GetName());   -- return nil
   local GTownerName = self:GetOwner():GetName();              -- return nil
end );

Is there any other method of detecting that the description displayed in GameTooltips is from the Aura button?

We can use the BuffFrame.AuraContainer:IsMouseOver() function

Last edited by Platine : 10-31-22 at 07:59 AM.
  Reply With Quote
10-31-22, 03:46 PM   #2
A Pyroguard Emberseer
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,279
I get the feeling this is part of some bigger picture which has an easier solution than what you're focused on currently.

It's certainly possible if you absolutely need to filter out tooltip handling to specific buttons, but there's a point where the performance cost would be drastically higher than hooking the OnEnter handler of your target buttons for example.

Right now, there's just not enough information of the overall process to suggest a better alternative.

Another example is how BuffOwner was written. The goal of the addon was to show who was the caster of a buff or debuff. I could've followed the same route of hooking whenever the tooltip was shown and figure out if the calling button was from an aura button. Instead, I came to the conclusion that it didn't need to know that. All it needed was the buff's info, and hooking the appropriate :Set() functions that generate the description in the first place would be adequate for retrieving it.
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 10-31-22 at 03:52 PM.
  Reply With Quote

WoWInterface » PTR » PTR API and Graphics Changes » Dragonflight : BuffButton : GameTooltips

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off