WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Legion Beta archived threads (https://www.wowinterface.com/forums/forumdisplay.php?f=177)
-   -   How do you hide cooldown text? (https://www.wowinterface.com/forums/showthread.php?t=53406)

galvin 05-02-16 11:00 PM

How do you hide cooldown text?
 
How do you hide the built in cooldown text.
I use the cooldownframe template.

I just want my addon to hide the text, since I have my own text showing the cooldown.

EDIT: found it CooldownFrame:SetHideCountdownNumbers(true or false)

This setting stops working once you resize the cooldown frame. I have no idea how to work around this.
Changing the UI scale in the blizzard settings has the same effect, reporting this as a bug in the forums.

lightspark 05-02-16 11:55 PM

Cooldown text is one of the regions of cooldown frame, currently it's the first one, so I "hide" it this way:
Lua Code:
  1. local text = CooldownFrame:GetRegions()
  2. text:SetAlpha(0)

You may try to force hide it, doing something like this to regions normally doesn't cause problems, but I dun remember whether it's a taint-free solution or not. But there's definitely an issue, cuz I dun use it in this case, hehe...
Lua Code:
  1. local text = CooldownFrame:GetRegions()
  2. text:Hide()
  3. text.Show = text.Hide

You may try to re-parent it to a hidden dummy frame.

SDPhantom 05-03-16 11:27 AM

The CVar that is ultimately the master switch is countdownForCooldowns. cooldown:SetHideCountdownNumbers() differentiates which CooldownFrames should show the numbers and when to show them.

galvin 05-03-16 12:15 PM

Yeah I already found that function. Problem is its bugged on beta when you change the scale of the texture.
Blizzard uses the same function in the death knight rune code. Its thru xml, but it bugs out just the same.
I haven't tried the work around yet.

SDPhantom 05-03-16 12:57 PM

I was explaining the differences between the CVar and the API function. The CVar better suits your needs.

galvin 05-03-16 01:52 PM

I can't turn off the setting, that would effect the whole UI, and someone may get annoyed that my mod turns it off, and they're not seeing cooldown text on their UI.

SDPhantom 05-03-16 03:21 PM

I thought you were asking how to turn it off globally. I'm guessing as a workaround to the resizing problem, you can try to hook into the OnSizeChanged script and reapply the setting. Either that or set it every time you call cooldown:SetCooldown().

galvin 05-03-16 03:36 PM

Already tried reapplying doesn't work. I think the work around posted above is best unless it causes taint.
Haven't had time to try it yet.

SDPhantom 05-03-16 03:48 PM

You can try it, but as the entire thing happens on C side, I doubt it'll work.

galvin 05-03-16 05:37 PM

You're right the work around didn't work.
Most will probably turn it off and use omnicc. The built in stuff isn't as flexible where you can use it.
If blizzard fixes it then i'll use it in my mod.

Edit: The cooldown animation bugs out even if you're not using the hidecooldowntext call. Blizzard needs to fix that.

galvin 05-03-16 07:05 PM

Found a work around.
Code:

        local AG = CooldownFrame:CreateAnimationGroup()
        local A = AG:CreateAnimation('Alpha')

        AG:SetLooping('NONE')
        A:SetOrder(1)
        A:SetDuration(0)

        A:SetFromAlpha(1)
        A:SetToAlpha(1)

        CooldownFrame.AG = AG
        CooldownFrame.A = A

Then just do a CooldownFrame.A:Play() before calling SetCooldown()
And now I can use SetHideCountdownNumbers(true), all works now. Hopefully they fix it cause I hate doing hacks like this.

SDPhantom 05-04-16 02:33 AM

I can't even begin to fathom how this works. It must be a quirk of some type.

galvin 05-04-16 02:57 AM

Here's another weird one.
Interface\ChatFrame\ChatFrameColorSwatch

If I try to show this texture it appears green like it doesn't exist. But its in the files.
Blizzards built in color picker has issues showing it too.

Fizzlemizz 05-04-16 11:12 AM

"Interface\\ChatFrame\\ChatFrameColorSwatch"

You have to double up the backslashes when setting a texture.

galvin 05-04-16 01:40 PM

Only when used in quotes when using [[ ]] you don't. Already tested this and the default UI bugs out using this texture as well. But its weird how it doesn't work even though you can extract the texture from the game files and view it.

Fizzlemizz 05-04-16 02:20 PM

Quote:

Originally Posted by galvin (Post 314574)
Only when used in quotes when using [[ ]] you don't. Already tested this and the default UI bugs out using this texture as well. But its weird how it doesn't work even though you can extract the texture from the game files and view it.

This has happened several times over the years. Maybe something like a pixel too big/small or some other texture requirement not being met.

SDPhantom 05-04-16 02:43 PM

Loaded the texture using both notations and it's working fine using either of these.
Code:

"Interface\\ChatFrame\\ChatFrameColorSwatch"
[[Interface\ChatFrame\ChatFrameColorSwatch]]



Here's a copy of the test code:
Lua Code:
  1. local tex=UIParent:CreateTexture(nil,"BACKGROUND");
  2. tex:SetTexture("Interface\\ChatFrame\\ChatFrameColorSwatch");
  3. tex:SetPoint("CENTER");
  4. tex:SetSize(16,16);

galvin 05-04-16 03:56 PM

Well I'm at a loss. the ace3 gui is showing green around all the color picker buttons. And when I went in and changed the alpha to zero it turned into a green square. That lead me to believe it was the swatch texture. AceGUIWidget-ColorPicker.lua maybe you can find something that can be fixed.

The color picker is suppose to show a colored square too.

There's something weird going on, go into general tab then background. The square doesn't stay on as you change the color. This is in the default UI.

I redid my test, and it worked, but still doesn't solve the issue.

SDPhantom 05-04-16 07:33 PM

Is this live or alpha? I've been testing both so far.

galvin 05-05-16 01:05 AM

alpha, hoping next build fixes some of these bugs.


All times are GMT -6. The time now is 12:43 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI