Renamed config to C, because L exists
Tuller [08-30-10 - 21:10]
Renamed config to C, because L exists
Added missing files from last commit
diff --git a/tullaCC/cc.lua b/tullaCC/cc.lua
index 9998f21..2ab0bb3 100644
--- a/tullaCC/cc.lua
+++ b/tullaCC/cc.lua
@@ -14,17 +14,17 @@ local DAYISH, HOURISH, MINUTEISH = 3600 * 23.5, 60 * 59.5, 59.5 --used for forma
local HALFDAYISH, HALFHOURISH, HALFMINUTEISH = DAY/2 + 0.5, HOUR/2 + 0.5, MINUTE/2 + 0.5 --used for calculating next update times
--configuration settings
-local FONT_FACE = STANDARD_TEXT_FONT --what font to use
-local FONT_SIZE = 18 --the base font size to use at a scale of 1
-local FONT_COLOR = {1, 0.92, 0}
-local MIN_SCALE = 0.5 --the minimum scale we want to show cooldown counts at, anything below this will be hidden
-local MIN_DURATION = 3 --the minimum duration to show cooldown text for
-local EXPIRING_DURATION = 5 --the minimum number of seconds a cooldown must be to use to display in the expiring format
-local EXPIRING_FORMAT = '|cffff0000%d|r' --format for timers that are soon to expire
-local SECONDS_FORMAT = '|cffffff00%d|r' --format for timers that have seconds remaining
-local MINUTES_FORMAT = '|cffffffff%dm|r' --format for timers that have minutes remaining
-local HOURS_FORMAT = '|cff66ffff%dh|r' --format for timers that have hours remaining
-local DAYS_FORMAT = '|cff6666ff%dh|r' --format for timers that have days remaining
+local C = select(2, ...) --pull in the addon table
+local FONT_FACE = C.fontFace --what font to use
+local FONT_SIZE = C.fontSize --the base font size to use at a scale of 1
+local MIN_SCALE = C.minScale--the minimum scale we want to show cooldown counts at, anything below this will be hidden
+local MIN_DURATION = C.minDuration --the minimum duration to show cooldown text for
+local EXPIRING_DURATION = C.expiringDuration --the minimum number of seconds a cooldown must be to use to display in the expiring format
+local EXPIRING_FORMAT = C.expiringFormat --format for timers that are soon to expire
+local SECONDS_FORMAT = C.secondsFormat --format for timers that have seconds remaining
+local MINUTES_FORMAT = C.minutesFormat --format for timers that have minutes remaining
+local HOURS_FORMAT = C.hoursFormat --format for timers that have hours remaining
+local DAYS_FORMAT = C.daysFormat --format for timers that have days remaining
--local bindings!
local floor = math.floor
@@ -95,7 +95,7 @@ local function Timer_OnUpdate(self, elapsed)
else
local remain = self.duration - (GetTime() - self.start)
if round(remain) > 0 then
- if (self.fontScale * self:GetEffectiveScale()) < MIN_SCALE then
+ if (self.fontScale * self:GetEffectiveScale() / UIParent:GetScale()) < MIN_SCALE then
self.text:SetText('')
self.nextUpdate = 1
else
@@ -122,7 +122,6 @@ local function Timer_Create(cd)
local text = timer:CreateFontString(nil, 'OVERLAY')
text:SetPoint('CENTER', 0, 0)
- text:SetTextColor(unpack(FONT_COLOR))
timer.text = text
Timer_OnSizeChanged(timer, scaler:GetSize())
diff --git a/tullaCC/config.lua b/tullaCC/config.lua
index 8552fc8..d058272 100644
--- a/tullaCC/config.lua
+++ b/tullaCC/config.lua
@@ -1,23 +1,22 @@
--[[
- Confuration settings for tullaCC
+ Curation settings for tullaCC
--]]
-local Conf = select(2, ...)
+local C = select(2, ...) --retrieve addon table
--font settings
-Conf.fontFace = STANDARD_TEXT_FONT --what font to use
-Conf.fontSize = 18 --the base font size to use at a scale of 1
-Conf.fontColor = {1, 0.92, 0} --the minimum scale we want to show cooldown counts at, anything below this will be hidden
+C.fontFace = STANDARD_TEXT_FONT --what font to use
+C.fontSize = 18 --the base font size to use at a scale of 1
--display settings
-Conf.minScale = 0.6 --the minimum duration to show cooldown text for
-Conf.minDuration = 3 --the minimum number of seconds a cooldown must be to use to display in the expiring format
-Conf.expiringDuration = 5 --the minimum number of seconds a cooldown must be to use to display in the expiring format
+C.minScale = 0.6 --the minimum duration to show cooldown text for
+C.minDuration = 3 --the minimum number of seconds a cooldown must be to use to display in the expiring format
+C.expiringDuration = 5 --the minimum number of seconds a cooldown must be to use to display in the expiring format
--text format strings
-Conf.expiringFormat = '|cffff0000%d|r' --format for timers that are soon to expire
-Conf.secondsFormat = '|cffffff00%d|r' --format for timers that have seconds remaining
-Conf.minutesFormat = '|cffffffff%dm|r' --format for timers that have minutes remaining
-Conf.hoursFormat = '|cff66ffff%dh|r' --format for timers that have hours remaining
-Conf.daysFormat = '|cff6666ff%dh|r' --format for timers that have days remaining
\ No newline at end of file
+C.expiringFormat = '|cffff0000%d|r' --format for timers that are soon to expire
+C.secondsFormat = '|cffffff00%d|r' --format for timers that have seconds remaining
+C.minutesFormat = '|cffffffff%dm|r' --format for timers that have minutes remaining
+C.hoursFormat = '|cff66ffff%dh|r' --format for timers that have hours remaining
+C.daysFormat = '|cff6666ff%dh|r' --format for timers that have days remaining
\ No newline at end of file
diff --git a/tullaCC/tullaCC.toc b/tullaCC/tullaCC.toc
index ebf7fbd..eb323c1 100644
--- a/tullaCC/tullaCC.toc
+++ b/tullaCC/tullaCC.toc
@@ -2,5 +2,6 @@
## Title: tullaCooldownCount
## Notes: Adds text to cooldowns
## Author: Tuller
-## Version: 1.4
+## Version: 1.5
+config.lua
cc.lua
\ No newline at end of file