TellMeWhen

TellMeWhen

24M Downloads

[CF 1632] Visibility issues with "icon" dogtag

tmw-issue-import opened this issue ยท 2 comments

commented

When using the "[Icon(data, size=0)]" dogtag in the text layout of an icon, the displayed dogtag/custom icon does not follow visibility/opacity rules of the parent icon it is attached to, and will always be visible at 100% opacity. When the parent icon is invisible or hidden due to a condition for example, the custom icon will still show up on the screen (linked picture). This does not seem like intended behavior since, for example, a stack counter on a text layout will not be visible when the parent icon is hidden, and will also follow the parent icon's opacity setting as well.

 

https://imgur.com/a/imLoMrS


Posted by CurseForge user jadugarr | Imported from CurseForge issue #1632 | Raw

commented

Looks like something that Blizzard broke. I have no control over the way that textures are rendered in text. The [Icon] tag is just inserting WoW's standard format for injecting a texture into a piece of text.

 

If you put other text around your [Icon] - e.g. "a[Icon("blah")]bcd", you'll see that the text around it isn't visible but the texture is.

 

You can work around this by using 1% as your hidden opacity instead of 0%.


Posted by CurseForge user Cybeloras

commented

Submitted a bug in-game, which will probably go straight into the dumpster, but here's some repro steps for posterity:

 

local f = CreateFrame("Frame")
f:SetPoint("CENTER")
f:SetSize(100, 100)

 

local fs = f:CreateFontString(nil, "OVERLAY", "GameFontNormalHuge")
fs:SetText("abc |TInterface/Icons/spell_nature_healingtouch:0|t def")
fs:SetPoint("TOPLEFT")

 

f:SetAlpha(0)

 

The healing touch icon will be visible, but "abc" and "def" won't be.


Posted by CurseForge user Cybeloras