Quantcast WoWInterface - View Single Post - Tooltip is constantly reseting the backdrop
View Single Post
07-26-18, 11:59 PM   #9
A Pyroguard Emberseer
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,739
Where did the post from nevereg go? I thought about it a bit more and I think going for the GameTooltip_SetBackdropStyle hook might be a the best approach.

We can get rid of so many other hooks and we have access to the backdrop attributes from blizzard.

You could just match style against GAME_TOOLTIP_BACKDROP_STYLE_AZERITE_ITEM and know that the style you are handling is for azerite.

alternative A
Lua Code:
  1. local azerite = style == GAME_TOOLTIP_BACKDROP_STYLE_AZERITE_ITEM or false

alternative B
Lua Code:
  1. local _, itemLink = self:GetItem()
  2. local azerite = false
  3. if itemLink and (C_AzeriteEmpoweredItem.IsAzeriteEmpoweredItemByID(itemLink) or C_AzeriteItem.IsAzeriteItemByID(itemLink)) then
  4.   azerite = true
  5. end

I am going to change my tooltip to that method. It seems convenient for what I am trying to do.

*edit* Commit hooking into SetBackdropStyle https://github.com/zorker/rothui/com...ceda45d583d2fa
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW) | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 07-27-18 at 12:49 AM.
  Reply With Quote