itsSinba / SinStats

SinStats is an advanced stats addon made for Classic, Wrath of the Lich King Classic and Dragonflight that displays a large range of stats updated in real-time on a highly customizable frame that can be placed anywhere on your screen.
https://www.curseforge.com/wow/addons/sinstats
2 stars 2 forks source link

Wrath Classic (3.4.1) scanning tooltip improvement #7

Closed Road-block closed 1 year ago

Road-block commented 1 year ago

Since 3.4.1 some of the old style scanning tooltips cause issues with default game tooltips that are on a perpetually refreshing timer (examples: temporary weapon enchant tooltips for rogue:poison/shaman:imbues/warlock:spellstones, items with a temporary tradeable timer, buff tooltips etc)

A scanning tooltip parented to UIParent or with UIParent as its owner causes artifacts on those kinds of tooltips: misaligned text, blank or expanding text.

The more often scanTooltip:Set is called the more pronounced the effect.

The way to solve this is to avoid creating the scanning tooltip with a UIParent parent and SetOwner to WorldFrame instead.

The relevant changes to SinStats are: SinStats\Stats\Wrath\Misc.lua:8 to

local repairTooltip = CreateFrame("GameTooltip", "SinStatsTooltip", nil, "GameTooltipTemplate")
repairTooltip:SetOwner(WorldFrame, "ANCHOR_NONE")

and SinStats\Stats\Classic\Misc.lua:8 to

local repairTooltip = CreateFrame("GameTooltip", "SinStatsTooltipClassic", nil, "GameTooltipTemplate")
repairTooltip:SetOwner(WorldFrame, "ANCHOR_NONE")

This will keep the scanning tooltips working without causing artifacts to refreshing default game tooltips.

itsSinba commented 1 year ago

Thanks for your input Road-block. It definitely makes sense, I will implement it in the next update. Cheers