Download
(5 Kb)
Download
Updated: 02-10-14 04:20 PM
Pictures
File Info
Compatibility:
Siege of Orgrimmar (5.4)
Escalation (5.3)
Thunder Isle (5.2)
Landfall (5.1)
Mists of Pandaria (5.0.4)
Updated:02-10-14 04:20 PM
Created:07-31-10 01:59 PM
Downloads:22,731
Favorites:203
MD5:
5.4
tullaCooldownCount  Popular! (More than 5000 hits)
Version: 5.4.3
by: Tuller [More]
tullaCooldownCount (tullaCC) is a minimal addon for displaying cooldown text on action buttons, inventory items, etc.

Source code for the addon can be found on GitHub

Why on Earth would you release two cooldown count addons?
Why not? :P
5.4.3
* Fixed a typo
* Handled cases where timer.start or timer.duration are nil.

5.4.2
* Fixed issues with the display of active cooldowns upon /reloadui
* Adjusted code to prevent conflicts with other addons.

5.4.1
* Fixed issues causing the shaman spell Ascendance to not show a cooldown.

5.4.0
* TOC bump for WoW 5.4

5.3.0
* TOC bump for WoW 5.3

5.2.0
* TOC bump for WoW 5.2

5.1.0
* TOC bump for WoW 5.1

5.0.2
* Added support for skills with charges

5.0.1
* Removed OmniCC flag, since it was making things a pain to debug

5.0.0
* TOC bump for WoW 5.0

4.3.1
* TOC bump for WoW 4.3

4.3.0
* Added fixes to make tullaCC work with WoW 4.3 (backward compatible with WoW 4.2)

4.2.0
* TOC bump for WoW 4.2

2.3
* TOC bump for WoW 4.1

2.2b
* Testing out creating a zip from my Git repo

2.2
* Added the noCooldownCount check.

2.1
* Updated for WoW v4.0.1
* Switched to using the animation system for timers, which makes things go faster :P

1.5
* Moved configuration to a separate file, config.lua
* Made min scale setting be independent of UI scale.

1.4
* Switched to using SetFormattedText (thanks nirp)
* Made days and hours a bit more blue. (Overall theory here is that colors get warmer the closer timers are to expiring)

1.3
* Added text shadowing
* Added colors
* Filtered out text on items with a scale that's too tiny

1.2:
* Initial release
Optional Files (0)


Archived Files (19)
File Name
Version
Size
Author
Date
5.4.2
5kB
Tuller
02-09-14 02:09 PM
5.4.1
5kB
Tuller
01-04-14 07:12 PM
5.4.0
5kB
Tuller
10-03-13 05:08 PM
5.3.0
5kB
Tuller
05-22-13 05:10 PM
5.2.0
5kB
Tuller
03-05-13 05:32 AM
5.1.0
5kB
Tuller
11-27-12 04:15 PM
5.0.2
5kB
Tuller
10-22-12 06:03 PM
5.0.1
5kB
Tuller
09-02-12 07:45 PM
5.0.0
5kB
Tuller
08-28-12 05:29 AM
4.3.1
5kB
Tuller
11-29-11 06:06 PM
4.3.0
5kB
Tuller
11-06-11 10:16 AM
4.2.0
4kB
Tuller
06-27-11 07:27 PM
2.3
4kB
Tuller
04-26-11 06:19 PM
2.2
4kB
Tuller
11-09-10 04:51 PM
2.1
4kB
Tuller
10-11-10 04:55 PM
1.5
4kB
Tuller
08-31-10 08:33 PM
1.4
3kB
Tuller
08-27-10 02:50 PM
1.3
3kB
Tuller
08-26-10 06:32 PM
1.2
3kB
Tuller
07-31-10 01:59 PM


Post A Reply Comment Options
Old 08-28-10, 07:40 AM  
Xruptor
A Black Drake
 
Xruptor's Avatar
AddOn Author - Click to view AddOns

Forum posts: 87
File comments: 562
Uploads: 37
I agree I love this mod over OmniCC. It's small, efficient and does exactly what I want without all the OmniCC fluff. Kudos on a great mod Tuller. Thanks for the updates!
__________________
Click HERE for the ultimate idiot test.

if (sizeof(sadness) > sizeof(happiness)) { initDepression(); }
Xruptor is offline Report comment to moderator  
Reply With Quote
Old 08-28-10, 11:23 AM  
Opaque
A Fallenroot Satyr
 
Opaque's Avatar

Forum posts: 23
File comments: 143
Uploads: 0
Love the mod... but the change "* Filtered out text on items with a scale that's too tiny" isn't working for me, so I had to revert to an older version. I like tiny!
__________________
Opaque is offline Report comment to moderator  
Reply With Quote
Old 08-28-10, 11:58 AM  
Tuller
A Black Drake
 
Tuller's Avatar
AddOn Author - Click to view AddOns

Forum posts: 83
File comments: 1601
Uploads: 36
In your case, you're going to want to alter the minimum scale setting. Odds are, I'll probably implement a tweak to allow it to take into account uiScale settings.
Tuller is offline Report comment to moderator  
Reply With Quote
Old 08-28-10, 06:51 PM  
dmcleod
A Kobold Labourer

Forum posts: 1
File comments: 15
Uploads: 0
Mmmh, bar scales under 100% (dominos) -> no timer will appear :/

E.g.: 0.81 / 0.9
Last edited by dmcleod : 08-28-10 at 06:55 PM.
dmcleod is offline Report comment to moderator  
Reply With Quote
Old 08-28-10, 09:09 PM  
Tuller
A Black Drake
 
Tuller's Avatar
AddOn Author - Click to view AddOns

Forum posts: 83
File comments: 1601
Uploads: 36
The rule is, if the effective size of the button is under 18 pixels, then the timer does not show.
Tuller is offline Report comment to moderator  
Reply With Quote
Old 08-30-10, 12:35 AM  
Porsha
A Black Drake

Forum posts: 88
File comments: 106
Uploads: 0
The problem for me is pixel fonts. I use them. I have tried setting the min scale, font size, etc and what I thought this version would do is make the font the size I set it to: i.e. 10, and as long as the icon met the requirement of being ablove min_scale 0.5 (as I have it set) then the font would be size 10 for the countdown...however, this is not what happens...

It scales the font UP if the scale size of my icon is over 1.

If I have a filter icon, lets say I use Filger, as set an Icon to size 70...I still want my font size to be 10. Instead it distorts the font to some gross size.

I have also played with adding (thanks to Nin) this to the code:

self.text:SetFont(FONT_FACE, (fontScale * FONT_SIZE)* 1.4, 'OUTLINEMONOCHROME')

Now while this works with "some" of my cooldowns, it still distorts others if they do not follow the same rule...

I hope I'm clear. I love this addon. Does what I need, simply...but I use pixel fonts and its just being a pain ><

(I have used Neals basic version of OmniCC for ages so I'm familar) but was hoping finally I could use my pixel fonts without having to gum-up your code cause I suck at it, honestly.

thank you
Last edited by Porsha : 08-30-10 at 12:37 AM.
Porsha is offline Report comment to moderator  
Reply With Quote
Old 08-30-10, 01:33 PM  
zohar101
A Cyclonian
 
zohar101's Avatar

Forum posts: 43
File comments: 192
Uploads: 0
Is there a one liner code I can put in where the font size is defined that will allow me to change font size based on the toon I'm on?
One of those if "this toon" then font size = whatever? I have no idea how I'd write it but is it possible? If it would require too much mucking around, forget I asked
zohar101 is offline Report comment to moderator  
Reply With Quote
Old 08-30-10, 07:50 PM  
Tuller
A Black Drake
 
Tuller's Avatar
AddOn Author - Click to view AddOns

Forum posts: 83
File comments: 1601
Uploads: 36
The next update to tullaCC will move config settings to a separate file (config.lua) using the handy dandy ... stuff we get in v3.3.x. This should theoretically make it easier to mod the defaults of tullaCC without having to deal with changes to the main code (cc.lua).

@zohar:
It depends on if UnitName('player') returns anything useful pre PLAYER_LOGIN.

@Porsha:
You probably want to disable he OnSizeChanged code and replace it with a single static SetFontSize call.
Last edited by Tuller : 08-30-10 at 07:54 PM.
Tuller is offline Report comment to moderator  
Reply With Quote
Old 08-31-10, 05:33 PM  
Porsha
A Black Drake

Forum posts: 88
File comments: 106
Uploads: 0
I tried that but .. what about this line?

Timer_OnSizeChanged(timer, scaler:GetSize())
scaler:SetScript('OnSizeChanged', function(self, ...) Timer_OnSizeChanged(timer, ...) end)

cd.timer = timer
return timer
end

Just comment it out but then it doesnt work at all - and now this line

if timer.fontScale >= MIN_SCALE then timer:Show() end
--stop timer
else
local timer = cd.timer
if timer then
Timer_Stop(timer)
end

So sorry and dont make a mess for you to change for me...I can wait for the config you are talking about

--hide if it gets too tiny
local function Timer_OnSizeChanged(self, width, height)
self.text:SetFont(FONT_FACE, (fontScale * FONT_SIZE)*1.4, 'OUTLINEMONOCHROME')
self.text:SetShadowColor(0, 0, 0, 0.8)
self.text:SetShadowOffset(1, -1)
if self.enabled then
Timer_ForceUpdate(self)
end
end
end


Also when I change (just actually delete you code for scale and such) this does nothing ><

I* can follow code somewhat and tried to copy font settings from other addons (Lyn and Nins code) but I find even though they are all LUA files...you guys speak differently the language :P (if you catch my drift?)

thanks for any attention, much appreciated

dani
Porsha is offline Report comment to moderator  
Reply With Quote
Old 08-31-10, 08:41 PM  
Porsha
A Black Drake

Forum posts: 88
File comments: 106
Uploads: 0
I think I figured it out - its working for me anyways with my font (pixel) set at 10 and my Filger set at 50 icon size my font stays the same size 10 =)

Only thing I cant figure out is the smaller sizes as in Dominos action buttons. The font is ok but not size 10 as the buttons are smaller which may not be a bad thing cause the font may overlap off the edges of the buttons if the font was size 10 normal.

Anyways, for anyone else, here with what I changed with commenting out the FONT_SIZE at the top of the page ( may not have needed to do that but whatevers). Delete the entire code:

--adjust font size whenever the timer's parent size changes
--hide if it gets too tiny
local function Timer_OnSizeChanged(self, width, height)
local fontScale = round(width) / ICON_SIZE
if fontScale == self.fontScale then
return
end

self.fontScale = fontScale
if fontScale < MIN_SCALE then
self:Hide()
else
self.text:SetFont(FONT_FACE, fontScale * FONT_SIZE, 'OUTLINE')
self.text:SetShadowColor(0, 0, 0, 0.8)
self.text:SetShadowOffset(1, -1)
if self.enabled then
Timer_ForceUpdate(self)
end
end
end


AND REPLACE WITH THIS entire code copy:


-- DOES NOT adjust font size whenever the timer's parent size changes
--hide if it gets too tiny

local function Timer_OnSizeChanged(self, width, height)
local fontScale = 1

self.fontScale = fontScale
self.text:SetFont(FONT_FACE, 10, 'OUTLINEMONOCHROME')
self.text:SetShadowColor(0, 0, 0, 0.8)
self.text:SetShadowOffset(1, -1)
if self.enabled then
Timer_ForceUpdate(self)
end
end


Hope this helps anyone and thank you Tull for such fabulous works

/cheers
Porsha is offline Report comment to moderator  
Reply With Quote
Old 09-01-10, 11:52 AM  
kbc8090
A Murloc Raider

Forum posts: 6
File comments: 73
Uploads: 0
I noticed this line in the code:

OmniCC = OmniCC or true --hack to work around detection from other addons for OmniCC

There is an option in Stuf Unit Frames that allow them to ignore OmniCC, which I have checked for my debuffs on my playerframe, however it is not working. I looked in the code and I'm somewhat affluent with LUA coding but I'm not really sure what's going on.
kbc8090 is offline Report comment to moderator  
Reply With Quote
Old 09-01-10, 01:38 PM  
SDPhantom
A Molten Giant
 
SDPhantom's Avatar
AddOn Author - Click to view AddOns

Forum posts: 933
File comments: 66
Uploads: 17
Looks almost exactly like what I did for SpellWatchLite.
__________________
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
SDPhantom is offline Report comment to moderator  
Reply With Quote
Old 09-01-10, 02:46 PM  
Tuller
A Black Drake
 
Tuller's Avatar
AddOn Author - Click to view AddOns

Forum posts: 83
File comments: 1601
Uploads: 36
@SDPhantom:
Can you clarify what you mean?

@kbc8090:
The OmniCC line is there to make tullaCC work nicely with Inline Aura. I'd probably have to implement support for the .noCooldownCount flag to work with Stuf.

@Porsha:
Only thing I cant figure out is the smaller sizes as in Dominos action buttons. The font is ok but not size 10 as the buttons are smaller which may not be a bad thing cause the font may overlap off the edges of the buttons if the font was size 10 normal.
That's exactly why font scaling is implemented
Tuller is offline Report comment to moderator  
Reply With Quote
Old 09-01-10, 06:53 PM  
kbc8090
A Murloc Raider

Forum posts: 6
File comments: 73
Uploads: 0
Originally posted by Tuller
@SDPhantom:
Can you clarify what you mean?

@kbc8090:
The OmniCC line is there to make tullaCC work nicely with Inline Aura. I'd probably have to implement support for the .noCooldownCount flag to work with Stuf.

@Porsha:

That's exactly why font scaling is implemented
From what I can tell I got it working.

Added this under local bindings:
local timers = {}

Added this function:
local function HideTimer(self)
local timer = timers[self]
if timer then
timer:Hide()
end
end

Then added this under the hooksecurefunc:
if cd.noCooldownCount then
HideTimer(self)
elseif start > 0 and duration > MIN_DURATION then



Tested in Option House and it's using the same cpu as it was before, maxing out around 0.350 cpu/sec, whatever that means. Consequently TullaRange is one of my most cpu intensive mods maxing out around 1.2. It's better than using ractionbar range checking every .5 seconds for twice the cpu power though
kbc8090 is offline Report comment to moderator  
Reply With Quote
Old 09-01-10, 09:06 PM  
Porsha
A Black Drake

Forum posts: 88
File comments: 106
Uploads: 0
@kbc8090:

Was that in responce to me? Is that to stop font scaling?
Sorry, I'm confused :P

Oh nm...I see what you are referring to now - carry on!

/hides
Last edited by Porsha : 09-01-10 at 09:07 PM.
Porsha is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: