Thread Tools Display Modes
05-02-16, 11:00 PM   #1
galvin
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 265
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.

Last edited by galvin : 05-02-16 at 11:49 PM.
 
05-02-16, 11:55 PM   #2
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
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.
__________________

Last edited by lightspark : 05-03-16 at 12:05 AM.
 
05-03-16, 11:27 AM   #3
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
The CVar that is ultimately the master switch is countdownForCooldowns. cooldown:SetHideCountdownNumbers() differentiates which CooldownFrames should show the numbers and when to show them.
__________________
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)
 
05-03-16, 12:15 PM   #4
galvin
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 265
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.
 
05-03-16, 12:57 PM   #5
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
I was explaining the differences between the CVar and the API function. The CVar better suits your needs.
__________________
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)
 
05-03-16, 01:52 PM   #6
galvin
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 265
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.
 
05-03-16, 03:21 PM   #7
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
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().
__________________
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)
 
05-03-16, 03:36 PM   #8
galvin
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 265
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.
 
05-03-16, 03:48 PM   #9
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
You can try it, but as the entire thing happens on C side, I doubt it'll work.
__________________
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)
 
05-03-16, 05:37 PM   #10
galvin
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 265
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.

Last edited by galvin : 05-03-16 at 05:48 PM.
 
05-03-16, 07:05 PM   #11
galvin
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 265
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.

Last edited by galvin : 05-03-16 at 07:10 PM.
 
05-04-16, 02:33 AM   #12
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
I can't even begin to fathom how this works. It must be a quirk of some type.
__________________
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)
 
05-04-16, 02:57 AM   #13
galvin
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 265
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.
 
05-04-16, 11:12 AM   #14
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
"Interface\\ChatFrame\\ChatFrameColorSwatch"

You have to double up the backslashes when setting a texture.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
 
05-04-16, 01:40 PM   #15
galvin
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 265
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.
 
05-04-16, 02:20 PM   #16
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
Originally Posted by galvin View Post
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.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
 
05-04-16, 02:43 PM   #17
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
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);
__________________
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)
 
05-04-16, 03:56 PM   #18
galvin
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 265
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.
 
05-04-16, 07:33 PM   #19
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
Is this live or alpha? I've been testing both so far.
__________________
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)
 
05-05-16, 01:05 AM   #20
galvin
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 265
alpha, hoping next build fixes some of these bugs.
 
 

WoWInterface » Site Forums » Archived Beta Forums » Legion Beta archived threads » How do you hide cooldown text?

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