Commit f7f64aa6 authored by Blazeflack's avatar Blazeflack

Removed ExactAuras support as the addon has been removed for a while now

parent a5eefeaa
......@@ -39,10 +39,6 @@ P['VAT'] = {
['hoursIndicator'] = { r = 0, g = 179/255, b = 1 },
['days'] = { r = 0.93, g = 0.93, b = 0.93 },
['daysIndicator'] = { r = 0, g = 179/255, b = 1 },
--ExactAuras support
['hourminutes'] = { r = 0.93, g = 0.93, b = 0.93 },
['hourminutesIndicator'] = { r = 0, g = 179/255, b = 1 },
},
}
......@@ -361,7 +357,6 @@ function VAT:InsertOptions()
E.db.VAT.colors.minutes = P['VAT']['colors'].minutes;
E.db.VAT.colors.hours = P['VAT']['colors'].hours;
E.db.VAT.colors.days = P['VAT']['colors'].days;
E.db.VAT.colors.hourminutes = P['VAT']['colors'].hourminutes;
VAT:UpdateTimerColors()
end,
},
......@@ -450,22 +445,6 @@ function VAT:InsertOptions()
VAT:UpdateTimerColors()
end,
},
hourminutes = {
type = 'color',
order = 8,
name = L['Hour/Minutes'],
desc = L['Color when the text is in the HH:MM format (provided by the ExactAuras addon).'],
get = function(info)
local t = E.db.VAT.colors[ info[#info] ]
return t.r, t.g, t.b, t.a
end,
set = function(info, r, g, b)
E.db.VAT.colors[ info[#info] ] = {}
local t = E.db.VAT.colors[ info[#info] ]
t.r, t.g, t.b = r, g, b
VAT:UpdateTimerColors()
end,
},
},
},
dateIndicator = {
......@@ -484,7 +463,6 @@ function VAT:InsertOptions()
E.db.VAT.colors.minutesIndicator = P['VAT']['colors'].minutesIndicator;
E.db.VAT.colors.hoursIndicator = P['VAT']['colors'].hoursIndicator;
E.db.VAT.colors.daysIndicator = P['VAT']['colors'].daysIndicator;
E.db.VAT.colors.hourminutesIndicator = P['VAT']['colors'].hourminutesIndicator;
VAT:UpdateTimerColors()
end,
},
......@@ -573,22 +551,6 @@ function VAT:InsertOptions()
VAT:UpdateTimerColors()
end,
},
hourminutesIndicator = {
type = 'color',
order = 8,
name = L['Hour/Minutes'],
desc = L['Color when the text is in the HH:MM format (provided by the ExactAuras addon).'],
get = function(info)
local t = E.db.VAT.colors[ info[#info] ]
return t.r, t.g, t.b, t.a
end,
set = function(info, r, g, b)
E.db.VAT.colors[ info[#info] ] = {}
local t = E.db.VAT.colors[ info[#info] ]
t.r, t.g, t.b = r, g, b
VAT:UpdateTimerColors()
end,
},
},
},
},
......
......@@ -378,11 +378,7 @@ function VAT:UpdateTime(elapsed)
local timerValue, formatID
timerValue, formatID, self.nextUpdate = E:GetTimeInfo(self.timeLeft, E.db.VAT.decimalThreshold)
if type(timerValue) == 'string' then --ExactAuras support
self.time:SetFormattedText(VAT:FormatString(timerValue, formatID))
else
self.time:SetFormattedText(("%s%s|r%s%s|r"):format(VAT.TimeColors[formatID], VAT.TimeFormats[formatID][1], VAT.IndicatorColors[formatID], VAT.TimeFormats[formatID][2]), timerValue)
end
self.time:SetFormattedText(("%s%s|r%s%s|r"):format(VAT.TimeColors[formatID], VAT.TimeFormats[formatID][1], VAT.IndicatorColors[formatID], VAT.TimeFormats[formatID][2]), timerValue)
if self.timeLeft > E.db.auras.fadeThreshold then
E:StopFlash(self)
......@@ -391,22 +387,9 @@ function VAT:UpdateTime(elapsed)
end
end
function VAT:FormatString(str, formatID)
local a,b,c,d = strmatch(str, "(%d+)(%a)%s(%d+)(%a)") --Credit Cutepally
if a and b == 'h' and c and d == 'm' then
local formatString = format("%s%s|r%s%s|r%s%s|r%s%s|r", VAT.TimeColors[formatID], VAT.TimeFormats[formatID][1], VAT.IndicatorColors[formatID], VAT.TimeFormats[formatID][3], VAT.TimeColors[formatID], VAT.TimeFormats[formatID][2], VAT.IndicatorColors[formatID], VAT.TimeFormats[formatID][4])
return formatString, tonumber(a), tonumber(c)
end
end
function VAT:UpdateTimerColors()
local c, c2
--color for timers shown in the HH:MM format (ExactAuras support)
c, c2 = E.db.VAT.colors.hourminutes, E.db.VAT.colors.hourminutesIndicator
VAT.TimeColors[5] = E:RGBToHex(c.r, c.g, c.b)
VAT.IndicatorColors[5] = E:RGBToHex(c2.r, c2.g, c2.b)
-- colors for timers that are soon to expire
c, c2 = E.db.VAT.colors.expire, E.db.VAT.colors.expireIndicator
VAT.TimeColors[4] = E:RGBToHex(c.r, c.g, c.b)
......
......@@ -14,14 +14,12 @@ L['Changes the statusbar to use a static color instead of going from green to re
L['Choose where you want the statusbar to be positioned. If you position it on the left or right side of the icon I advice you to increase Horizontal Spacing for Buffs and Debuffs. Changing this requires you to reload UI.'] = true;
L['Choose which color you want the statusbar backdrops to use. Tip: use light colors for dark statusbar colors and vice versa.'] = true;
L['Choose which color you want your statusbars to use.'] = true;
L['Color when the text is in the HH:MM format (provided by the ExactAuras addon).'] = true;
L["Debuffs Threshold"] = true;
L["Debuffs"] = true;
L["Decimal Threshold"] = true;
L['Enable Static Color'] = true;
L['General Options'] = true;
L["Height of the statusbar frame (default: 5). Changing this requires you to reload UI."] = true;
L['Hour/Minutes'] = true;
L["If enabled, the timers on your buffs will switch to text when duration goes below set threshold."] = true;
L["If enabled, the timers on your debuffs will switch to text when duration goes below set threshold."] = true;
L["If enabled, the timers on your temporary enchant(s) will switch to text when duration goes below set threshold."] = true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment