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,326
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,326
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.
 
 

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


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