R
(9Kb)
Download
Updated: 12-28-21 10:46 AM
C
(9kB)
Download
Updated: 12-28-21 10:45 AM
BC
(9kB)
Download
Updated: 12-28-21 10:45 AM
Pictures
File Info
Compatibility:
Shadowlands patch (9.1.5)
Updated:12-28-21 10:46 AM
Created:07-31-10 01:59 PM
Downloads:45,338
Favorites:220
MD5:

tullaCC  Popular! (More than 5000 hits)

Version: 9.1.6, Classic: 9.1.6
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

tullaCC
9.1.6 (2021-12-28)
Full Changelog Previous Releases
  • Update packager
Optional Files (1)
File Name
Version
Size
Author
Date
Type
9.0.0-beta
9kB
08-09-20 01:16 PM
Patch


Archived Files (4)
File Name
Version
Size
Author
Date
9.1.5
9kB
Tuller
12-28-21 10:40 AM
9.1.5
9kB
Tuller
12-28-21 10:40 AM
9.1.5
9kB
Tuller
12-28-21 10:40 AM
9.0.1
9kB
Tuller
05-06-21 04:42 PM


Post A Reply Comment Options
Unread 09-27-10, 03:01 PM  
Tuller
A Warpwood Thunder Caller
 
Tuller's Avatar
AddOn Author - Click to view AddOns

Forum posts: 91
File comments: 1740
Uploads: 17
@Lane:
What do you mean exactly?
Report comment to moderator  
Reply With Quote
Unread 09-27-10, 02:40 PM  
Lane
An Aku'mai Servant
AddOn Author - Click to view AddOns

Forum posts: 36
File comments: 63
Uploads: 2
Is there anything this simple for Target Debuff duration? I'm asking because I'm trying to add the feature to my own addon and need some tutorial code that doesn't include libraries.
Report comment to moderator  
Reply With Quote
Unread 09-01-10, 09:06 PM  
Porsha
A Black Drake

Forum posts: 88
File comments: 104
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.
Report comment to moderator  
Reply With Quote
Unread 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
Report comment to moderator  
Reply With Quote
Unread 09-01-10, 02:46 PM  
Tuller
A Warpwood Thunder Caller
 
Tuller's Avatar
AddOn Author - Click to view AddOns

Forum posts: 91
File comments: 1740
Uploads: 17
@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
Report comment to moderator  
Reply With Quote
Unread 09-01-10, 01:38 PM  
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2323
File comments: 132
Uploads: 38
Looks almost exactly like what I did for SpellWatchLite.
__________________
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)
Report comment to moderator  
Reply With Quote
Unread 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.
Report comment to moderator  
Reply With Quote
Unread 08-31-10, 08:41 PM  
Porsha
A Black Drake

Forum posts: 88
File comments: 104
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
Report comment to moderator  
Reply With Quote
Unread 08-31-10, 05:33 PM  
Porsha
A Black Drake

Forum posts: 88
File comments: 104
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
Report comment to moderator  
Reply With Quote
Unread 08-30-10, 07:50 PM  
Tuller
A Warpwood Thunder Caller
 
Tuller's Avatar
AddOn Author - Click to view AddOns

Forum posts: 91
File comments: 1740
Uploads: 17
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.
Report comment to moderator  
Reply With Quote
Unread 08-30-10, 01:33 PM  
zohar101
A Cyclonian
 
zohar101's Avatar

Forum posts: 43
File comments: 188
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
Report comment to moderator  
Reply With Quote
Unread 08-30-10, 12:35 AM  
Porsha
A Black Drake

Forum posts: 88
File comments: 104
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.
Report comment to moderator  
Reply With Quote
Unread 08-28-10, 09:09 PM  
Tuller
A Warpwood Thunder Caller
 
Tuller's Avatar
AddOn Author - Click to view AddOns

Forum posts: 91
File comments: 1740
Uploads: 17
The rule is, if the effective size of the button is under 18 pixels, then the timer does not show.
Report comment to moderator  
Reply With Quote
Unread 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.
Report comment to moderator  
Reply With Quote
Unread 08-28-10, 11:58 AM  
Tuller
A Warpwood Thunder Caller
 
Tuller's Avatar
AddOn Author - Click to view AddOns

Forum posts: 91
File comments: 1740
Uploads: 17
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.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: