Skip to content
This repository has been archived by the owner on Jan 28, 2023. It is now read-only.

Commit

Permalink
porting new engine back over from omnicc
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuller committed Sep 1, 2019
1 parent 2e45ca9 commit ad0dff9
Show file tree
Hide file tree
Showing 8 changed files with 899 additions and 255 deletions.
1 change: 1 addition & 0 deletions .pkgmeta
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-as: tullaCC
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tullaCooldownCount is a minimal addon for displaying cooldown text on action buttons, inventory items, etc. in World of Warcraft
tullaCC is a minimal addon for displaying cooldown text on action buttons, inventory items, etc. in World of Warcraft

Source code for the addon can be found at: http://github.com/tullamods/tullaCC
134 changes: 102 additions & 32 deletions config.lua
Original file line number Diff line number Diff line change
@@ -1,66 +1,136 @@
--[[ Configuration settings for tullaCC ]]--

local AddonName, Addon = ...
local _G = _G
-- tullaCC configuration settings
local _, Addon = ...

local defaults = {
-- glowy animation at the end of a cooldown
drawBling = false,
-- what font to use
fontFace = function() return STANDARD_TEXT_FONT end,

-- show/hide the cooldown animation itself
drawEdge = false,
-- the base font size to use at a scale of 1
fontSize = 18,

--show hide a glowy edge on the cooldown
drawSwipe = true,
-- font outline: OUTLINE, THICKOUTLINE, MONOCHROME, or nil
fontOutline = nil,

--what font to use
fontFace = function() return _G.STANDARD_TEXT_FONT end,
-- font shadow settings
fontShadow = {
-- color
r = 0,
g = 0,
b = 0,
a = 1,

--the base font size to use at a scale of 1
fontSize = 18,
-- offsets
x = 1,
y = -1
},

--the minimum scale we want to show cooldown counts at, anything below this will be hidden
-- the minimum scale we want to show cooldown counts at, anything below this will be hidden
minScale = 0.6,

--the minimum number of seconds a cooldown's duration must be to display text
-- the minimum number of seconds a cooldown's duration must be to display text
minDuration = 3,

--the minimum number of seconds a cooldown must be to display in the expiring format
-- the minimum number of seconds a cooldown must be to display in the expiring format
expiringDuration = 5,

-- when to show tenths of seconds remaining
tenthsDuration = 3,

-- when to show both minutes and seconds remaining
mmSSDuration = 0,

--format for timers that are soon to expire
expiringFormat = '|cffff0000%d|r',
tenthsFormat = '0.1f',

--format for timers that have seconds remaining
secondsFormat = '|cffffff00%d|r',
secondsFormat = '%d',

--format for timers displaying MM:SS
mmssFormat = '%d:%02d',

--format for timers that have minutes remaining
minutesFormat = '|cffffffff%dm|r',
minutesFormat = '%dm',

--format for timers that have hours remaining
hoursFormat = '|cff66ffff%dh|r',
hoursFormat = '%dh',

--format for timers that have days remaining
daysFormat = '|cff6666ff%dd|r'
daysFormat = '%dd',

styles = {
-- loss of control
controlled = {
r = 1,
g = 0.1,
b = 0.1,
a = 1,
scale = 1.5
},

-- ability recharging
charging = {
r = 0.8,
g = 1,
b = 0.3,
a = 0.8,
scale = 0.75
},

-- ability will be ready shortly
soon = {
r = 1,
g = 0.1,
b = 0.1,
a = 1,
scale = 1.5
},

-- less than a minute to go
seconds = {
r = 1,
g = 1,
b = 0.1,
a = 1,
scale = 1
},

-- less than an hour to go
minutes = {
r = 1,
g = 1,
b = 1,
a = 1,
scale = 1
},

-- less than a day to go
hours = {
r = 0.7,
g = 0.7,
b = 0.7,
a = 0.7,
scale = 0.75
},

-- a day or longer to go
days = {
r = 0.7,
g = 0.7,
b = 0.7,
a = 0.7,
scale = 0.75
}
}
}

Addon.Config = setmetatable({}, {
__index = function(t, k)
local value = defaults[k]

if value and type(value) == 'function' then
if type(value) == 'function' then
return value()
end

return value
end
})

--make config editable
do
local gAddon = _G[AddonName] or {}

gAddon.Config = Addon.Config

_G[AddonName] = gAddon
end
Loading

0 comments on commit ad0dff9

Please sign in to comment.