diff --git a/api/api.lua b/api/api.lua index 07b1e57b..b2c9d902 100644 --- a/api/api.lua +++ b/api/api.lua @@ -1425,54 +1425,6 @@ function pfUI.api.DisableAutohide(frame) frame:SetAlpha(1) end --- [ GetCountdownFormatter ] -- --- The C_StringUtil formatter behind pfUI's times: the number in its unit's --- cooldown color, rounded up, with a unit (m/h/d) once the unit below --- passes 99. Cooldown frames share it instead of copying it, so new --- breakpoints reach every countdown on its next update. --- return the shared NumericRuleFormatter -local countdown_formatter - -local function ColorCode(color) - local r, g, b = pfUI.api.GetStringColor(color) - return pfUI.api.rgbhex(r, g, b) -end - -local function UpdateCountdownFormatter() - local cd = C.appearance.cd - local up = Enum.NumericRuleFormatRounding.Up - local tenths = cd.milliseconds == "1" - - countdown_formatter:SetBreakpoints({ - { threshold = 0, step = tenths and .1 or 1, rounding = up, format = ColorCode(cd.lowcolor) .. (tenths and "%.1f" or "%d") .. "|r" }, - { threshold = 5, step = 1, rounding = up, format = ColorCode(cd.normalcolor) .. "%d|r" }, - { threshold = 99, format = ColorCode(cd.minutecolor) .. "%d|rm", components = { { div = 60, step = 1, rounding = up } } }, - { threshold = 5940, format = ColorCode(cd.hourcolor) .. "%d|rh", components = { { div = 3600, step = 1, rounding = up } } }, - { threshold = 356400, format = ColorCode(cd.daycolor) .. "%d|rd", components = { { div = 86400, step = 1, rounding = up } } }, - }) -end - -function pfUI.api.GetCountdownFormatter() - if not countdown_formatter then - countdown_formatter = C_StringUtil.CreateNumericRuleFormatter() - UpdateCountdownFormatter() - end - return countdown_formatter -end - -pfUI.events:RegisterCallback("config:changed", function(_, category) - if countdown_formatter and category == C.appearance.cd then - UpdateCountdownFormatter() - end -end) - --- [ GetColoredTime ] -- --- 'remaining' the time in seconds that should be converted --- return a colored string including a time unit (m/h/d) -function pfUI.api.GetColoredTimeString(remaining) - return pfUI.api.GetCountdownFormatter():FormatNumber(remaining) -end - -- [ GetColorGradient ] -- -- 'perc' percentage (0-1) -- return r,g,b and hexcolor diff --git a/api/config.lua b/api/config.lua index 5cf5f32d..93d10371 100644 --- a/api/config.lua +++ b/api/config.lua @@ -71,8 +71,6 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("buffs", nil, "debuffrowsize", "16") pfUI:UpdateConfig("buffs", nil, "textinside", "0") pfUI:UpdateConfig("buffs", nil, "fontsize", "-1") - pfUI:UpdateConfig("buffs", nil, "cooldown_anim", "1") - pfUI:UpdateConfig("buffs", nil, "cooldown_reverse", "1") pfUI:UpdateConfig("buffbar", "pbuff", "enable", "0") pfUI:UpdateConfig("buffbar", "pbuff", "use_unitfonts", "0") @@ -140,21 +138,50 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("appearance", "border", "panels", "-1") pfUI:UpdateConfig("appearance", "border", "chat", "-1") pfUI:UpdateConfig("appearance", "border", "bags", "-1") - pfUI:UpdateConfig("appearance", "cd", "lowcolor", "1,.2,.2,1") - pfUI:UpdateConfig("appearance", "cd", "normalcolor", "1,1,1,1") - pfUI:UpdateConfig("appearance", "cd", "minutecolor", ".2,1,1,1") - pfUI:UpdateConfig("appearance", "cd", "hourcolor", ".2,.5,1,1") - pfUI:UpdateConfig("appearance", "cd", "daycolor", ".2,.2,1,1") - pfUI:UpdateConfig("appearance", "cd", "threshold", "2") - pfUI:UpdateConfig("appearance", "cd", "font_size", "12") - pfUI:UpdateConfig("appearance", "cd", "font_size_blizz", "12") - pfUI:UpdateConfig("appearance", "cd", "font_size_foreign","12") - pfUI:UpdateConfig("appearance", "cd", "blizzard", "1") - pfUI:UpdateConfig("appearance", "cd", "foreign", "0") - pfUI:UpdateConfig("appearance", "cd", "milliseconds", "1") - pfUI:UpdateConfig("appearance", "cd", "hideanim", "0") - pfUI:UpdateConfig("appearance", "cd", "font", "Interface\\AddOns\\pfUI\\fonts\\BigNoodleTitling.ttf") - pfUI:UpdateConfig("appearance", "cd", "dynamicsize", "1") + + pfUI:UpdateConfig("cooldown", nil, "font", "Interface\\AddOns\\pfUI\\fonts\\BigNoodleTitling.ttf") + pfUI:UpdateConfig("cooldown", nil, "font_size", "12") + pfUI:UpdateConfig("cooldown", nil, "dynamicsize", "1") + pfUI:UpdateConfig("cooldown", nil, "threshold", "2") + pfUI:UpdateConfig("cooldown", nil, "milliseconds", "1") + pfUI:UpdateConfig("cooldown", nil, "lowcolor", "1,.2,.2,1") + pfUI:UpdateConfig("cooldown", nil, "normalcolor", "1,1,1,1") + pfUI:UpdateConfig("cooldown", nil, "minutecolor", ".2,1,1,1") + pfUI:UpdateConfig("cooldown", nil, "hourcolor", ".2,.5,1,1") + pfUI:UpdateConfig("cooldown", nil, "daycolor", ".2,.2,1,1") + pfUI:UpdateConfig("cooldown", "actionbar", "text", "1") + pfUI:UpdateConfig("cooldown", "actionbar", "animation", "1") + pfUI:UpdateConfig("cooldown", "actionbar", "reverse", "0") + pfUI:UpdateConfig("cooldown", "bags", "text", "1") + pfUI:UpdateConfig("cooldown", "bags", "animation", "1") + pfUI:UpdateConfig("cooldown", "bags", "reverse", "0") + pfUI:UpdateConfig("cooldown", "blizzard", "text", "1") + pfUI:UpdateConfig("cooldown", "blizzard", "animation", "1") + pfUI:UpdateConfig("cooldown", "blizzard", "reverse", "0") + pfUI:UpdateConfig("cooldown", "unitframe", "text", "1") + pfUI:UpdateConfig("cooldown", "unitframe", "animation", "0") + pfUI:UpdateConfig("cooldown", "unitframe", "reverse", "1") + pfUI:UpdateConfig("cooldown", "indicator", "text", "1") + pfUI:UpdateConfig("cooldown", "indicator", "animation", "0") + pfUI:UpdateConfig("cooldown", "indicator", "reverse", "0") + pfUI:UpdateConfig("cooldown", "nameplate", "text", "1") + pfUI:UpdateConfig("cooldown", "nameplate", "animation", "0") + pfUI:UpdateConfig("cooldown", "nameplate", "reverse", "1") + pfUI:UpdateConfig("cooldown", "buff", "text", "1") + pfUI:UpdateConfig("cooldown", "buff", "animation", "1") + pfUI:UpdateConfig("cooldown", "buff", "reverse", "1") + pfUI:UpdateConfig("cooldown", "tooltip", "text", "1") + pfUI:UpdateConfig("cooldown", "tooltip", "animation", "0") + pfUI:UpdateConfig("cooldown", "tooltip", "reverse", "0") + pfUI:UpdateConfig("cooldown", "totem", "text", "1") + pfUI:UpdateConfig("cooldown", "totem", "animation", "1") + pfUI:UpdateConfig("cooldown", "totem", "reverse", "1") + pfUI:UpdateConfig("cooldown", "lossofcontrol", "text", "1") + pfUI:UpdateConfig("cooldown", "lossofcontrol", "animation", "1") + pfUI:UpdateConfig("cooldown", "lossofcontrol", "reverse", "0") + pfUI:UpdateConfig("cooldown", "foreign", "text", "0") + pfUI:UpdateConfig("cooldown", "foreign", "animation", "1") + pfUI:UpdateConfig("appearance", "castbar", "castbarcolor", ".7,.7,.9,.8") pfUI:UpdateConfig("appearance", "castbar", "channelcolor", ".9,.9,.7,.8") pfUI:UpdateConfig("appearance", "castbar", "failcolor", "1,.2,.2,.8") @@ -175,7 +202,6 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("appearance", "bags", "abovechat", "0") pfUI:UpdateConfig("appearance", "bags", "hidechat", "0") pfUI:UpdateConfig("appearance", "bags", "icon_size", "-1") - pfUI:UpdateConfig("appearance", "bags", "cooldown_reverse", "0") pfUI:UpdateConfig("appearance", "bags", "bagrowlength", "10") pfUI:UpdateConfig("appearance", "bags", "bankrowlength", "10") pfUI:UpdateConfig("appearance", "bags", "autoSortOnOpen", "0") @@ -519,9 +545,6 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("unitframes", unit, "portraitwidth", "-1") pfUI:UpdateConfig("unitframes", unit, "panchor", "TOP") pfUI:UpdateConfig("unitframes", unit, "pspace", "-3") - pfUI:UpdateConfig("unitframes", unit, "cooldown_text", "1") - pfUI:UpdateConfig("unitframes", unit, "cooldown_anim", "0") - pfUI:UpdateConfig("unitframes", unit, "cooldown_reverse", "1") pfUI:UpdateConfig("unitframes", unit, "buffs", "TOPLEFT") pfUI:UpdateConfig("unitframes", unit, "buffsize", "20") pfUI:UpdateConfig("unitframes", unit, "bufflimit", "32") @@ -552,7 +575,6 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("unitframes", unit, "show_procs", "0") pfUI:UpdateConfig("unitframes", unit, "show_totems", "0") pfUI:UpdateConfig("unitframes", unit, "all_procs", "0") - pfUI:UpdateConfig("unitframes", unit, "indicator_time", "1") pfUI:UpdateConfig("unitframes", unit, "indicator_stacks", "1") pfUI:UpdateConfig("unitframes", unit, "indicator_size", "10") pfUI:UpdateConfig("unitframes", unit, "indicator_spacing","1") @@ -687,8 +709,6 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("bars", nil, "count_color", ".2,1,.8,1") pfUI:UpdateConfig("bars", nil, "bind_size", "8") pfUI:UpdateConfig("bars", nil, "bind_color", "1,1,0,1") - pfUI:UpdateConfig("bars", nil, "cd_size", "12") - pfUI:UpdateConfig("bars", nil, "cooldown_reverse", "0") pfUI:UpdateConfig("bars", "gryphons", "texture", "None") pfUI:UpdateConfig("bars", "gryphons", "color", ".6,.6,.6,1") @@ -702,7 +722,6 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("totems", nil, "iconsize", "26") pfUI:UpdateConfig("totems", nil, "spacing", "3") pfUI:UpdateConfig("totems", nil, "showbg", "0") - pfUI:UpdateConfig("totems", nil, "cooldown_reverse", "1") pfUI:UpdateConfig("panel", nil, "use_unitfonts", "0") pfUI:UpdateConfig("panel", nil, "hide_leftchat", "0") @@ -948,10 +967,6 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("nameplates", "debuffs", "blacklist", "") pfUI:UpdateConfig("nameplates", "debuffs", "showstacks", "0") pfUI:UpdateConfig("nameplates", "debuffs", "position", "BOTTOM") - pfUI:UpdateConfig("nameplates", nil, "debufftimers", "1") - pfUI:UpdateConfig("nameplates", nil, "debufftext", "1") - pfUI:UpdateConfig("nameplates", nil, "debuffanim", "0") - pfUI:UpdateConfig("nameplates", nil, "debreverse", "1") pfUI:UpdateConfig("abuttons", nil, "enable", "1") pfUI:UpdateConfig("abuttons", nil, "position", "bottom") @@ -1351,7 +1366,7 @@ function pfUI:MigrateConfig() -- migrate buff indicators into seperate options (> 4.6.2) if checkversion(4, 6, 2) and pfUI_config.unitframes.show_hots then local unitframes = { "player", "target", "focus", "group", "grouptarget", "grouppet", "raid", "ttarget", "pet", "ptarget", "fallback", "tttarget" } - local options = { "show_hots", "all_hots", "show_procs", "show_totems", "all_procs", "indicator_time", "indicator_stacks", "indicator_size" } + local options = { "show_hots", "all_hots", "show_procs", "show_totems", "all_procs", "indicator_stacks", "indicator_size" } for _, unitframe in pairs(unitframes) do for _, option in pairs(options) do @@ -1398,11 +1413,6 @@ function pfUI:MigrateConfig() end end - -- migrate cooldown font from unit_font to separate setting - if checkversion(5, 4, 18) then - pfUI_config.appearance.cd.font = pfUI_config.global.font_unit - end - -- migrate combopoint size to separate settings if checkversion(5, 4, 18) then if pfUI_config.unitframes.combosize then diff --git a/api/cooldown.lua b/api/cooldown.lua new file mode 100644 index 00000000..e10dc327 --- /dev/null +++ b/api/cooldown.lua @@ -0,0 +1,194 @@ +-- load pfUI environment +setfenv(1, pfUI:GetEnvironment()) + +-- Every pfUI cooldown is a Cooldown frame from CreateCooldown, made for one +-- kind of timer. Settings -> Cooldown (C.cooldown) sets for each kind its +-- countdown numbers, its sweep and the sweep's direction, and shares one font +-- and one formatter between them all. The numbers are the frame's own +-- countdown (ClassicAPI): the engine ticks them, gated by the +-- countdownForCooldowns cvar. Other addons' Cooldown frames take the +-- "foreign" settings as their timers start. + +-- kinds that time spells or items: no numbers for the global cooldown +local spell = { actionbar = true, bags = true, blizzard = true, foreign = true } + +-- every cooldown CreateCooldown made, for UpdateCooldowns +local cooldowns = {} + +local function ColorCode(color) + local r, g, b = pfUI.api.GetStringColor(color) + return pfUI.api.rgbhex(r, g, b) +end + +-- The formatter behind every pfUI time: the number in its unit's color, +-- rounded up, with a unit (m/h/d) once the unit below passes 99. Cooldown +-- frames share it instead of copying it, so new breakpoints reach every +-- countdown on its next update. +local formatter + +local function UpdateFormatter() + local up = Enum.NumericRuleFormatRounding.Up + local tenths = C.cooldown.milliseconds == "1" + + formatter:SetBreakpoints({ + { threshold = 0, step = tenths and .1 or 1, rounding = up, format = ColorCode(C.cooldown.lowcolor) .. (tenths and "%.1f" or "%d") .. "|r" }, + { threshold = 5, step = 1, rounding = up, format = ColorCode(C.cooldown.normalcolor) .. "%d|r" }, + { threshold = 99, format = ColorCode(C.cooldown.minutecolor) .. "%d|rm", components = { { div = 60, step = 1, rounding = up } } }, + { threshold = 5940, format = ColorCode(C.cooldown.hourcolor) .. "%d|rh", components = { { div = 3600, step = 1, rounding = up } } }, + { threshold = 356400, format = ColorCode(C.cooldown.daycolor) .. "%d|rd", components = { { div = 86400, step = 1, rounding = up } } }, + }) +end + +local function GetFormatter() + if not formatter then + formatter = C_StringUtil.CreateNumericRuleFormatter() + UpdateFormatter() + end + return formatter +end + +-- [ GetCooldownFontSize ] -- +-- 'height' [number] the height of the frame the numbers sit on +-- return [number] the font size of cooldown numbers on that frame +function pfUI.api.GetCooldownFontSize(height) + local size = tonumber(C.cooldown.font_size) + if C.cooldown.dynamicsize == "1" and height > 0 then + size = math.max(height * .64, size) + end + return size +end + +-- sizes the numbers to the cooldown's parent; the size follows its height, +-- so a timer start calls this again whenever that height changed +local function UpdateFont(cooldown) + local height = (cooldown:GetParent() or cooldown):GetHeight() + cooldown.pfCountdownHeight = height + cooldown:GetCountdownFontString():SetFont(pfUI.media[C.cooldown.font], pfUI.api.GetCooldownFontSize(height), "OUTLINE") +end + +-- applies the settings of its kind to one of pfUI's cooldowns +local function SetupCooldown(cooldown) + local kind = cooldown.pfCooldownKind + local config = C.cooldown[kind] + local sweep = config.animation == "1" and not cooldown.pfTimeLeftOnly + + cooldown:SetHideCountdownNumbers(config.text ~= "1") + cooldown:SetDrawSwipe(sweep) + cooldown:SetDrawBling(sweep) + cooldown:SetReverse(config.reverse == "1") + cooldown:SetMinimumCountdownDuration(spell[kind] and tonumber(C.cooldown.threshold) * 1000 or 0) + cooldown:SetCountdownFormatter(GetFormatter()) + UpdateFont(cooldown) +end + +-- applies the "foreign" settings to another addon's cooldown. They only take +-- the numbers or the sweep away, which the addon may have set up itself, so +-- turning one back on needs a reload. +local function SetupForeign(cooldown) + local config = C.cooldown.foreign + + if config.animation ~= "1" then + cooldown:SetDrawSwipe(false) + cooldown:SetDrawBling(false) + end + + -- omnicc's flag for cooldowns that want no numbers + if config.text ~= "1" or cooldown.noCooldownCount then + cooldown:SetHideCountdownNumbers(true) + return + end + + cooldown:SetMinimumCountdownDuration(tonumber(C.cooldown.threshold) * 1000) + cooldown:SetCountdownFormatter(GetFormatter()) + UpdateFont(cooldown) +end + +-- runs as a pfUI cooldown's timer starts: a timer with a total brings back +-- the sweep a time-left-only one took away, and the font follows a changed +-- height +local function StartTimer(cooldown, timeleftOnly) + if cooldown.pfTimeLeftOnly ~= timeleftOnly then + cooldown.pfTimeLeftOnly = timeleftOnly + SetupCooldown(cooldown) + elseif cooldown:GetParent():GetHeight() ~= cooldown.pfCountdownHeight then + UpdateFont(cooldown) + end +end + +-- every timer, pfUI's or another addon's, Cooldown frame or 1.12 indicator +-- Model, is started through CooldownFrame_SetTimer +hooksecurefunc("CooldownFrame_SetTimer", function(cooldown) + -- the Models have no numbers and keep the stock timer + if not cooldown:IsObjectType("Cooldown") then return end + + if cooldown.pfCooldownKind then + StartTimer(cooldown, nil) + else + SetupForeign(cooldown) + end +end) + +-- [ CreateCooldown ] -- +-- Creates one of pfUI's cooldowns: a Cooldown frame over all of 'parent' +-- with the settings of its kind. Start it with CooldownFrame_SetTimer. +-- 'parent' [frame] the frame the cooldown covers +-- 'kind' [string] what it times, a group of C.cooldown: actionbar, +-- bags, blizzard, unitframe, indicator, nameplate, +-- buff, tooltip, totem or lossofcontrol +-- 'name' [string] optional frame name +-- return [frame] the Cooldown frame +function pfUI.api.CreateCooldown(parent, kind, name) + local cooldown = CreateFrame("Cooldown", name, parent, "CooldownFrameTemplate") + cooldown.pfCooldownKind = kind + table.insert(cooldowns, cooldown) + SetupCooldown(cooldown) + return cooldown +end + +-- [ SetCooldownTimeLeft ] -- +-- Starts a cooldown from its time left alone, for timers that report no +-- total (weapon enchants): the numbers show, the sweep stays off until a +-- timer with a total starts. +-- 'cooldown' [frame] a cooldown from CreateCooldown +-- 'timeleft' [number] the seconds left +function pfUI.api.SetCooldownTimeLeft(cooldown, timeleft) + StartTimer(cooldown, true) + cooldown:SetCooldown(GetTime(), timeleft) +end + +-- [ UpdateCooldowns ] -- +-- Applies changed cooldown settings to every pfUI cooldown. +function pfUI.api.UpdateCooldowns() + if formatter then UpdateFormatter() end + for _, cooldown in ipairs(cooldowns) do + SetupCooldown(cooldown) + end +end + +-- [ GetAuraTimer ] -- +-- The cooldown start and duration of an aura from C_UnitAuras, 0, 0 when it +-- has none. Talent-extended auras run past their Spell.dbc base duration, and +-- a start in the future would hold the timer until then, so the start is +-- capped to now. +-- 'duration' [number] the aura's duration +-- 'expirationTime' [number] the aura's expiration time +-- return [number] start, duration +function pfUI.api.GetAuraTimer(duration, expirationTime) + if expirationTime <= 0 then return 0, 0 end + + local now = GetTime() + local start, dur = expirationTime - duration, duration + if start > now or dur <= 0 then + start, dur = now, expirationTime - now + end + + if dur <= 0 then return 0, 0 end + return start, dur +end + +-- [ GetColoredTimeString ] -- +-- 'remaining' [number] the time in seconds that should be converted +-- return [string] the time as cooldown numbers show it +function pfUI.api.GetColoredTimeString(remaining) + return GetFormatter():FormatNumber(remaining) +end diff --git a/api/unitframes.lua b/api/unitframes.lua index 1b0f969e..c1cb907b 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -69,23 +69,6 @@ local function LayoutAuras(unit, unitstr) end end --- Returns the cooldown start and duration of an aura, 0, 0 when it has none. --- Start is capped to now: talent-extended auras run past their Spell.dbc base --- duration, and a start in the future trips the cooldown text's 2^32 --- wraparound branch. -local function AuraTimer(duration, expirationTime) - if expirationTime <= 0 then return 0, 0 end - - local now = GetTime() - local start, dur = expirationTime - duration, duration - if start > now or dur <= 0 then - start, dur = now, expirationTime - now - end - - if dur <= 0 then return 0, 0 end - return start, dur -end - -- Starts the timers RefreshUnit stored on the shown icons of an aura block. local function StartAuraTimers(icons) if not icons then return end @@ -109,7 +92,7 @@ local function RetimeAuras(icons, unitstr) local _, _, count, _, duration, expirationTime = C_UnitAuras.UnitAuraBySlot(unitstr, icons[i].slot) if count then icons[i].stacks:SetText(count > 1 and count or "") - icons[i].auraStart, icons[i].auraDuration = AuraTimer(duration, expirationTime) + icons[i].auraStart, icons[i].auraDuration = GetAuraTimer(duration, expirationTime) end i = i + 1 end @@ -550,10 +533,6 @@ function pfUI.uf:UpdateConfig() -- aura icon backdrops sit outside the icon, so gaps clear both borders local aura_border = (C.appearance.border.force_blizz == "1" and 1 or 2) * default_border - local cooldown_text = tonumber(f.config.cooldown_text) - local cooldown_anim = tonumber(f.config.cooldown_anim) - local cooldown_reverse = f.config.cooldown_reverse == "1" - local relative_point = "BOTTOM" if f.config.panchor == "TOPLEFT" then relative_point = "BOTTOMLEFT" @@ -920,17 +899,8 @@ function pfUI.uf:UpdateConfig() f.buffs[i]:SetFrameLevel(12) f.buffs[i]:RegisterForClicks("RightButtonUp") - f.buffs[i].cd = f.buffs[i].cd or CreateFrame("Cooldown", f.buffs[i]:GetName() .. "Cooldown", f.buffs[i], "CooldownFrameTemplate") + f.buffs[i].cd = f.buffs[i].cd or CreateCooldown(f.buffs[i], "unitframe", f.buffs[i]:GetName() .. "Cooldown") f.buffs[i].cd:SetFrameLevel(14) - f.buffs[i].cd.pfCooldownType = "ALL" - f.buffs[i].cd.pfCooldownStyleText = cooldown_text - f.buffs[i].cd.pfCooldownStyleAnimation = cooldown_anim - f.buffs[i].cd:SetDrawSwipe(cooldown_anim == 1) - f.buffs[i].cd:SetDrawBling(cooldown_anim == 1) - f.buffs[i].cd:SetReverse(cooldown_reverse) - - -- immediately show/hide existing cooldown text - f.buffs[i].cd:SetHideCountdownNumbers(cooldown_text == 0) f.buffs[i].id = i f.buffs[i]:Hide() @@ -980,17 +950,8 @@ function pfUI.uf:UpdateConfig() f.debuffs[i]:RegisterForClicks("RightButtonUp") f.debuffs[i]:SetNormalTexture(nil) - f.debuffs[i].cd = f.debuffs[i].cd or CreateFrame("Cooldown", f.debuffs[i]:GetName() .. "Cooldown", f.debuffs[i], "CooldownFrameTemplate") + f.debuffs[i].cd = f.debuffs[i].cd or CreateCooldown(f.debuffs[i], "unitframe", f.debuffs[i]:GetName() .. "Cooldown") f.debuffs[i].cd:SetFrameLevel(14) - f.debuffs[i].cd.pfCooldownType = "ALL" - f.debuffs[i].cd.pfCooldownStyleText = cooldown_text - f.debuffs[i].cd.pfCooldownStyleAnimation = cooldown_anim - f.debuffs[i].cd:SetDrawSwipe(cooldown_anim == 1) - f.debuffs[i].cd:SetDrawBling(cooldown_anim == 1) - f.debuffs[i].cd:SetReverse(cooldown_reverse) - - -- immediately show/hide existing cooldown text - f.debuffs[i].cd:SetHideCountdownNumbers(cooldown_text == 0) f.debuffs[i].id = i f.debuffs[i]:Hide() @@ -1936,7 +1897,7 @@ function pfUI.uf:RefreshUnit(unit, component) unit.buffs[i].stacks:SetText("") end - unit.buffs[i].auraStart, unit.buffs[i].auraDuration = AuraTimer(duration, expirationTime) + unit.buffs[i].auraStart, unit.buffs[i].auraDuration = GetAuraTimer(duration, expirationTime) else unit.buffs[i]:Hide() end @@ -1980,7 +1941,7 @@ function pfUI.uf:RefreshUnit(unit, component) unit.debuffs[i].slot = auraSlots[i] unit.debuffs[i]:Show() - unit.debuffs[i].auraStart, unit.debuffs[i].auraDuration = AuraTimer(duration, expirationTime) + unit.debuffs[i].auraStart, unit.debuffs[i].auraDuration = GetAuraTimer(duration, expirationTime) if stacks > 1 then unit.debuffs[i].stacks:SetText(stacks) @@ -2151,7 +2112,7 @@ function pfUI.uf:RefreshUnit(unit, component) if table.getn(unit.indicators) > 0 then local n = ScanAuraSlots(unitstr, "HELPFUL", auraSlots) for i=1,n do - local name, icon, count, _, _, expirationTime = C_UnitAuras.UnitAuraBySlot(unitstr, auraSlots[i]) + local name, icon, count, _, duration, expirationTime = C_UnitAuras.UnitAuraBySlot(unitstr, auraSlots[i]) if not name then break end local timeleft = expirationTime > 0 and (expirationTime - GetTime()) or nil @@ -2161,7 +2122,7 @@ function pfUI.uf:RefreshUnit(unit, component) local start, duration, prediction = libpredict:GetHotDuration(unitstr, filter.predict) pfUI.uf:AddIcon(unit, pos, icon, timeleft or prediction, count, tonumber(start), tonumber(duration)) else - pfUI.uf:AddIcon(unit, pos, icon, timeleft, count) + pfUI.uf:AddIcon(unit, pos, icon, timeleft, count, GetAuraTimer(duration, expirationTime)) end pos = pos + 1 break @@ -2173,13 +2134,13 @@ function pfUI.uf:RefreshUnit(unit, component) if table.getn(unit.indicator_custom) > 0 then local n = ScanAuraSlots(unitstr, "HELPFUL", auraSlots) for i=1,n do - local name, icon, count, _, _, expirationTime = C_UnitAuras.UnitAuraBySlot(unitstr, auraSlots[i]) + local name, icon, count, _, duration, expirationTime = C_UnitAuras.UnitAuraBySlot(unitstr, auraSlots[i]) if not name then break end local timeleft = expirationTime > 0 and (expirationTime - GetTime()) or nil local lowerName = name:lower() for _, filter in pairs(unit.indicator_custom) do if filter == lowerName then - pfUI.uf:AddIcon(unit, pos, icon, timeleft, count) + pfUI.uf:AddIcon(unit, pos, icon, timeleft, count, GetAuraTimer(duration, expirationTime)) pos = pos + 1 break end @@ -2189,12 +2150,12 @@ function pfUI.uf:RefreshUnit(unit, component) local debuffFilter = unit.config.selfdebuff == "1" and "HARMFUL|PLAYER" or "HARMFUL" n = ScanAuraSlots(unitstr, debuffFilter, auraSlots) for i=1,n do -- scan for custom debuffs - local name, icon, count, _, _, expirationTime = C_UnitAuras.UnitAuraBySlot(unitstr, auraSlots[i]) + local name, icon, count, _, duration, expirationTime = C_UnitAuras.UnitAuraBySlot(unitstr, auraSlots[i]) if name then local timeleft = expirationTime > 0 and (expirationTime - GetTime()) or nil for _, filter in pairs(unit.indicator_custom) do if filter == name:lower() then - pfUI.uf:AddIcon(unit, pos, icon, timeleft, count) + pfUI.uf:AddIcon(unit, pos, icon, timeleft, count, GetAuraTimer(duration, expirationTime)) pos = pos + 1 break end @@ -2425,7 +2386,6 @@ function pfUI.uf:EnableClickCast() end function pfUI.uf:AddIcon(frame, pos, icon, timeleft, stacks, start, duration) - local showtime = frame.config.indicator_time == "1" and true or nil local showstacks = frame.config.indicator_stacks == "1" and true or nil local position = frame.config.indicator_pos or "TOPLEFT" local iconsize = tonumber(frame.config.indicator_size) @@ -2448,11 +2408,7 @@ function pfUI.uf:AddIcon(frame, pos, icon, timeleft, stacks, start, duration) frame.icon[pos].stacks:SetJustifyH("RIGHT") frame.icon[pos].stacks:SetJustifyV("BOTTOM") - frame.icon[pos].cd = CreateFrame("Cooldown", nil, frame.icon[pos], "CooldownFrameTemplate") - frame.icon[pos].cd.pfCooldownStyleAnimation = 0 - frame.icon[pos].cd:SetDrawSwipe(false) - frame.icon[pos].cd:SetDrawBling(false) - frame.icon[pos].cd.pfCooldownType = "ALL" + frame.icon[pos].cd = CreateCooldown(frame.icon[pos], "indicator") frame.icon[pos].cd:SetFrameLevel(48) end @@ -2471,11 +2427,12 @@ function pfUI.uf:AddIcon(frame, pos, icon, timeleft, stacks, start, duration) frame.icon[pos].icon = icon end - -- show remaining time if config is set - if showtime and start and duration and timeleft < 100 and iconsize > 9 then + -- start the timer from the aura's duration, or from its time left alone + -- when a prediction has no duration; icons this small have no room for it + if iconsize > 9 and duration and duration > 0 then CooldownFrame_SetTimer(frame.icon[pos].cd, start, duration, 1) - elseif showtime and timeleft and timeleft < 100 and iconsize > 9 then - CooldownFrame_SetTimer(frame.icon[pos].cd, GetTime(), timeleft, 1) + elseif iconsize > 9 and timeleft and timeleft > 0 then + SetCooldownTimeLeft(frame.icon[pos].cd, timeleft) else CooldownFrame_SetTimer(frame.icon[pos].cd, GetTime(), 0, 1) end diff --git a/env/profiles.lua b/env/profiles.lua index b99a0336..cea27159 100644 --- a/env/profiles.lua +++ b/env/profiles.lua @@ -724,10 +724,10 @@ local light = { ["showicon"] = "1", }, }, + ["cooldown"] = { + ["font"] = "Interface\\AddOns\\pfUI\\fonts\\Myriad-Pro.ttf", + }, ["appearance"] = { - ["cd"] = { - ["font"] = "Interface\\AddOns\\pfUI\\fonts\\Myriad-Pro.ttf", - }, ["castbar"] = { ["texture"] = "Interface\\AddOns\\pfUI\\img\\bar_gradient", }, diff --git a/env/translations_deDE.lua b/env/translations_deDE.lua index 74bcb5d0..c2cd89ca 100644 --- a/env/translations_deDE.lua +++ b/env/translations_deDE.lua @@ -8,6 +8,7 @@ pfUI_translation["deDE"] = { ["Actionbar"] = nil, ["Action Bar"] = nil, ["Action Bar Border Size"] = nil, + ["Action Bars"] = nil, ["Active Addons"] = nil, ["Add button to the frame"] = nil, ["Added button"] = nil, @@ -80,7 +81,7 @@ pfUI_translation["deDE"] = { ["Buffbar Width"] = nil, ["Buff/Debuff Icons"] = nil, ["Buff/Debuff Indicators"] = nil, - ["Buff Font Size"] = nil, + ["Buff Indicators"] = nil, ["Buff Limit"] = nil, ["Buff Position"] = nil, ["Buffs"] = nil, @@ -151,19 +152,13 @@ pfUI_translation["deDE"] = { ["Configuration"] = nil, ["Configure"] = nil, ["Cooldown"] = nil, + ["Cooldown Color (5 Seconds Or Less)"] = nil, ["Cooldown Color (Days)"] = nil, ["Cooldown Color (Hours)"] = nil, - ["Cooldown Color (Less than 3 Sec)"] = nil, ["Cooldown Color (Minutes)"] = nil, ["Cooldown Color (Seconds)"] = nil, ["Cooldown / Durations"] = nil, - ["Cooldown Text Font"] = nil, - ["Cooldown Text Font Size"] = nil, - ["Cooldown Text Font Size (Blizzard Frames)"] = nil, - ["Cooldown Text Font Size (Foreign Frames)"] = nil, - ["Cooldown Text Size"] = nil, ["Cooldown Text Threshold"] = nil, - ["Cooldown Text Time Threshold"] = nil, ["Coordinates Location"] = nil, ["Coordinates On Minimap"] = nil, ["Copied to clipboard"] = nil, @@ -283,8 +278,6 @@ pfUI_translation["deDE"] = { ["Enable Custom Incoming Whispers Layout"] = nil, ["Enable Debuff Display"] = nil, ["Enable Debuffs"] = nil, - ["Enable Durations On Blizzard Frames"] = nil, - ["Enable Durations On Foreign Frames"] = nil, ["Enable Energy Ticks"] = nil, ["Enable Extended Guild Information"] = nil, ["Enable Frame Shadow"] = nil, @@ -342,6 +335,7 @@ pfUI_translation["deDE"] = { ["Font"] = nil, ["Font Options"] = nil, ["Font Padding"] = nil, + ["Font Size"] = nil, ["Font Style"] = nil, ["Force Blizzard Borders (|cffffaaaaExperimental|r)"] = nil, ["fps"] = nil, @@ -400,7 +394,6 @@ pfUI_translation["deDE"] = { ["Hide Channel Names"] = nil, ["Hide Chat When Bags Are Opened"] = nil, ["Hide Combat Log"] = nil, - ["Hide Foreign Cooldown Animations"] = nil, ["Hide Group Frames While In Raid"] = nil, ["Hide Healthbar On Critters"] = nil, ["Hide Healthbar On Enemy NPCs"] = nil, @@ -409,6 +402,7 @@ pfUI_translation["deDE"] = { ["Hide Healthbar On Friendly Players"] = nil, ["Hide Healthbar On Neutral NPCs"] = nil, ["Hide Healthbar On Totems"] = nil, + ["Hide Numbers On Spell Cooldowns Up To (Seconds)"] = nil, ["Hide Timeout"] = nil, ["Hide When Entering Combat"] = nil, ["Highlight Equipped Items"] = nil, @@ -481,6 +475,7 @@ pfUI_translation["deDE"] = { ["Look & Feel"] = nil, ["Loot"] = nil, ["Loot & Spam"] = nil, + ["Loss Of Control"] = nil, ["Macro Text Color"] = nil, ["Macro Text Size"] = nil, ["Main Actionbar"] = nil, @@ -520,6 +515,7 @@ pfUI_translation["deDE"] = { ["Name | Health Missing"] = nil, ["Name (Linebreak) -Health Missing"] = nil, ["Nameplate Border Size"] = nil, + ["Nameplate Debuffs"] = nil, ["Nameplates"] = nil, ["Nameplate Width"] = nil, ["Name (Short)"] = nil, @@ -558,6 +554,7 @@ pfUI_translation["deDE"] = { ["On State Change"] = nil, ["Options"] = nil, ["Orientation"] = nil, + ["Other Addons"] = nil, ["Other Panel: Minimap"] = nil, ["Outline"] = nil, ["Outlines"] = nil, @@ -586,6 +583,7 @@ pfUI_translation["deDE"] = { ["Pixel"] = nil, ["Player"] = nil, ["Player Buff Bar"] = nil, + ["Player Buffs"] = nil, ["Player Castbar"] = nil, ["Player Debuff Bar"] = nil, ["Player SP/Haste Display"] = nil, @@ -652,6 +650,7 @@ pfUI_translation["deDE"] = { ["Resting"] = nil, ["Reveal Unexplored Areas"] = nil, ["Switch to current zone"] = "Zur aktuellen Zone wechseln", + ["Reverse Sweep On"] = nil, ["Right"] = nil, ["Right Actionbar"] = nil, ["Right Anchor"] = nil, @@ -673,6 +672,7 @@ pfUI_translation["deDE"] = { ["Save & Reload"] = nil, ["Scale"] = nil, ["Scale Border On HiDPI Displays"] = nil, + ["Scale Font Size With Icon"] = nil, ["Scaling"] = nil, ["Screen Edge Glow Intensity"] = nil, ["Screen Resolution"] = nil, @@ -732,7 +732,7 @@ pfUI_translation["deDE"] = { ["Show Loot Icon"] = nil, ["Show Macro Text"] = nil, ["Show Meters By Default"] = nil, - ["Show Milliseconds When Timer Runs Out"] = nil, + ["Show Numbers On"] = nil, ["Show On Friendly Units"] = nil, ["Show On Hostile Units"] = nil, ["Show Procs Indicators"] = nil, @@ -750,10 +750,10 @@ pfUI_translation["deDE"] = { ["Show Spell Icon"] = nil, ["Show Spell Name"] = nil, ["Show Stacks"] = nil, + ["Show Sweep On"] = nil, + ["Show Tenths Below 5 Seconds"] = nil, ["Show Text"] = nil, - ["Show Time Left"] = nil, ["Show Timer"] = nil, - ["Show Timer Animation"] = nil, ["Show Timer Text"] = nil, ["Show Totems Indicators"] = nil, ["Shrink & Return"] = nil, @@ -770,8 +770,10 @@ pfUI_translation["deDE"] = { ["Soulshards"] = nil, ["Spacing"] = nil, ["Special Recipient"] = nil, + ["Spellbook And Character"] = nil, ["Spell Power Color"] = nil, ["Square"] = nil, + ["Stack Count Font Size"] = nil, ["Stance Bar 1"] = nil, ["Stance Bar 2"] = nil, ["Stance Bar 3"] = nil, @@ -806,7 +808,6 @@ pfUI_translation["deDE"] = { ["Thistle Tea"] = nil, ["Threshold To Trust Health Estimation"] = nil, ["Time"] = nil, - ["Timer"] = nil, ["Time Remaining"] = nil, ["Timer In Minutes"] = nil, ["Timestamp Brackets"] = nil, @@ -817,6 +818,7 @@ pfUI_translation["deDE"] = { ["Tiny (PixelPerfect)"] = nil, ["Toggle as Tank"] = nil, ["Tooltip"] = nil, + ["Tooltip Auras"] = nil, ["Tooltip Position"] = nil, ["Tooltip Text Font"] = nil, ["Tooltip Text Font Size"] = nil, @@ -828,11 +830,13 @@ pfUI_translation["deDE"] = { ["Total Gold"] = nil, ["Totem Direction"] = nil, ["Totem Icons"] = nil, + ["Totems"] = nil, ["Tracked Reputation"] = nil, ["Tracking Icon Size"] = nil, ["Trigger Actions On Key Down"] = nil, ["UI-Scale"] = nil, ["Unbuffed"] = nil, + ["Unit Frame Auras"] = nil, ["Unit Frame Border Size"] = nil, ["Unit Frame Layout"] = nil, ["Unit Frames"] = nil, @@ -859,7 +863,6 @@ pfUI_translation["deDE"] = { ["Use Custom Color Power Bar Background"] = nil, ["Use Custom Font Settings"] = nil, ["Use Custom Spell Power Color (unchecked = biggest school color)"] = nil, - ["Use Dynamic Font Size"] = nil, ["Use Item Rarity Color For Loot-Roll Timer"] = nil, ["Use Original Game Fonts"] = nil, ["Use Raid Frames To Display Group Members"] = nil, diff --git a/env/translations_enUS.lua b/env/translations_enUS.lua index c62b3d9d..6cd37593 100644 --- a/env/translations_enUS.lua +++ b/env/translations_enUS.lua @@ -8,6 +8,7 @@ pfUI_translation["enUS"] = { ["Actionbar"] = nil, ["Action Bar"] = nil, ["Action Bar Border Size"] = nil, + ["Action Bars"] = nil, ["Active Addons"] = nil, ["Add button to the frame"] = nil, ["Added button"] = nil, @@ -83,7 +84,7 @@ pfUI_translation["enUS"] = { ["Buffbar Width"] = nil, ["Buff/Debuff Icons"] = nil, ["Buff/Debuff Indicators"] = nil, - ["Buff Font Size"] = nil, + ["Buff Indicators"] = nil, ["Buff Limit"] = nil, ["Buff Position"] = nil, ["Buffs"] = nil, @@ -157,19 +158,13 @@ pfUI_translation["enUS"] = { ["Configuration"] = nil, ["Configure"] = nil, ["Cooldown"] = nil, + ["Cooldown Color (5 Seconds Or Less)"] = nil, ["Cooldown Color (Days)"] = nil, ["Cooldown Color (Hours)"] = nil, - ["Cooldown Color (Less than 3 Sec)"] = nil, ["Cooldown Color (Minutes)"] = nil, ["Cooldown Color (Seconds)"] = nil, ["Cooldown / Durations"] = nil, - ["Cooldown Text Font"] = nil, - ["Cooldown Text Font Size"] = nil, - ["Cooldown Text Font Size (Blizzard Frames)"] = nil, - ["Cooldown Text Font Size (Foreign Frames)"] = nil, - ["Cooldown Text Size"] = nil, ["Cooldown Text Threshold"] = nil, - ["Cooldown Text Time Threshold"] = nil, ["Coordinates Location"] = nil, ["Coordinates On Minimap"] = nil, ["Copied to clipboard"] = nil, @@ -292,8 +287,6 @@ pfUI_translation["enUS"] = { ["Enable Custom Incoming Whispers Layout"] = nil, ["Enable Debuff Display"] = nil, ["Enable Debuffs"] = nil, - ["Enable Durations On Blizzard Frames"] = nil, - ["Enable Durations On Foreign Frames"] = nil, ["Enable Energy Ticks"] = nil, ["Enable Extended Guild Information"] = nil, ["Enable Frame Shadow"] = nil, @@ -352,6 +345,7 @@ pfUI_translation["enUS"] = { ["Font"] = nil, ["Font Options"] = nil, ["Font Padding"] = nil, + ["Font Size"] = nil, ["Font Style"] = nil, ["Force Blizzard Borders (|cffffaaaaExperimental|r)"] = nil, ["fps"] = nil, @@ -410,7 +404,6 @@ pfUI_translation["enUS"] = { ["Hide Channel Names"] = nil, ["Hide Chat When Bags Are Opened"] = nil, ["Hide Combat Log"] = nil, - ["Hide Foreign Cooldown Animations"] = nil, ["Hide Group Frames While In Raid"] = nil, ["Hide Healthbar On Critters"] = nil, ["Hide Healthbar On Enemy NPCs"] = nil, @@ -419,6 +412,7 @@ pfUI_translation["enUS"] = { ["Hide Healthbar On Friendly Players"] = nil, ["Hide Healthbar On Neutral NPCs"] = nil, ["Hide Healthbar On Totems"] = nil, + ["Hide Numbers On Spell Cooldowns Up To (Seconds)"] = nil, ["Hide Timeout"] = nil, ["Hide When Entering Combat"] = nil, ["Highlight Equipped Items"] = nil, @@ -493,6 +487,7 @@ pfUI_translation["enUS"] = { ["Loot"] = nil, ["Loot & Spam"] = nil, ["Loot History"] = nil, + ["Loss Of Control"] = nil, ["Macro Text Color"] = nil, ["Macro Text Size"] = nil, ["Main Actionbar"] = nil, @@ -533,6 +528,7 @@ pfUI_translation["enUS"] = { ["Name | Health Missing"] = nil, ["Name (Linebreak) -Health Missing"] = nil, ["Nameplate Border Size"] = nil, + ["Nameplate Debuffs"] = nil, ["Nameplates"] = nil, ["Nameplate Width"] = nil, ["Name (Short)"] = nil, @@ -574,6 +570,7 @@ pfUI_translation["enUS"] = { ["Optional Dependencies"] = nil, ["Options"] = nil, ["Orientation"] = nil, + ["Other Addons"] = nil, ["Other Panel: Minimap"] = nil, ["Outline"] = nil, ["Outlines"] = nil, @@ -604,6 +601,7 @@ pfUI_translation["enUS"] = { ["Pixel"] = nil, ["Player"] = nil, ["Player Buff Bar"] = nil, + ["Player Buffs"] = nil, ["Player Castbar"] = nil, ["Player Debuff Bar"] = nil, ["Player SP/Haste Display"] = nil, @@ -671,6 +669,7 @@ pfUI_translation["enUS"] = { ["Reveal Unexplored Areas"] = nil, ["Switch to current zone"] = nil, ["Retrieving item information..."] = nil, + ["Reverse Sweep On"] = nil, ["Right"] = nil, ["Right Actionbar"] = nil, ["Right Anchor"] = nil, @@ -692,6 +691,7 @@ pfUI_translation["enUS"] = { ["Save & Reload"] = nil, ["Scale"] = nil, ["Scale Border On HiDPI Displays"] = nil, + ["Scale Font Size With Icon"] = nil, ["Scaling"] = nil, ["Screen Edge Glow Intensity"] = nil, ["Screen Resolution"] = nil, @@ -751,7 +751,7 @@ pfUI_translation["enUS"] = { ["Show Loot Icon"] = nil, ["Show Macro Text"] = nil, ["Show Meters By Default"] = nil, - ["Show Milliseconds When Timer Runs Out"] = nil, + ["Show Numbers On"] = nil, ["Show On Friendly Units"] = nil, ["Show On Hostile Units"] = nil, ["Show Procs Indicators"] = nil, @@ -769,10 +769,10 @@ pfUI_translation["enUS"] = { ["Show Spell Icon"] = nil, ["Show Spell Name"] = nil, ["Show Stacks"] = nil, + ["Show Sweep On"] = nil, + ["Show Tenths Below 5 Seconds"] = nil, ["Show Text"] = nil, - ["Show Time Left"] = nil, ["Show Timer"] = nil, - ["Show Timer Animation"] = nil, ["Show Timer Text"] = nil, ["Show Totems Indicators"] = nil, ["Shrink & Return"] = nil, @@ -794,8 +794,10 @@ pfUI_translation["enUS"] = { ["Soulshards"] = nil, ["Spacing"] = nil, ["Special Recipient"] = nil, + ["Spellbook And Character"] = nil, ["Spell Power Color"] = nil, ["Square"] = nil, + ["Stack Count Font Size"] = nil, ["Stance Bar 1"] = nil, ["Stance Bar 2"] = nil, ["Stance Bar 3"] = nil, @@ -831,7 +833,6 @@ pfUI_translation["enUS"] = { ["Thistle Tea"] = nil, ["Threshold To Trust Health Estimation"] = nil, ["Time"] = nil, - ["Timer"] = nil, ["Timer Alignment"] = nil, ["Timer X Offset"] = nil, ["Timer Y Offset"] = nil, @@ -845,6 +846,7 @@ pfUI_translation["enUS"] = { ["Tiny (PixelPerfect)"] = nil, ["Toggle as Tank"] = nil, ["Tooltip"] = nil, + ["Tooltip Auras"] = nil, ["Tooltip Position"] = nil, ["Tooltip Text Font"] = nil, ["Tooltip Text Font Size"] = nil, @@ -856,11 +858,13 @@ pfUI_translation["enUS"] = { ["Total Gold"] = nil, ["Totem Direction"] = nil, ["Totem Icons"] = nil, + ["Totems"] = nil, ["Tracked Reputation"] = nil, ["Tracking Icon Size"] = nil, ["Trigger Actions On Key Down"] = nil, ["UI-Scale"] = nil, ["Unbuffed"] = nil, + ["Unit Frame Auras"] = nil, ["Unit Frame Border Size"] = nil, ["Unit Frame Layout"] = nil, ["Unit Frames"] = nil, @@ -887,7 +891,6 @@ pfUI_translation["enUS"] = { ["Use Custom Color Power Bar Background"] = nil, ["Use Custom Font Settings"] = nil, ["Use Custom Spell Power Color (unchecked = biggest school color)"] = nil, - ["Use Dynamic Font Size"] = nil, ["Use Item Rarity Color For Loot-Roll Timer"] = nil, ["Use Original Game Fonts"] = nil, ["Use Raid Frames To Display Group Members"] = nil, diff --git a/env/translations_esES.lua b/env/translations_esES.lua index 8a229fec..6f6ad371 100644 --- a/env/translations_esES.lua +++ b/env/translations_esES.lua @@ -8,6 +8,7 @@ pfUI_translation["esES"] = { ["Actionbar"] = "Barra de acción", ["Action Bar"] = "Barra de acción", ["Action Bar Border Size"] = "Tamaño del borde de la barra de acción", + ["Action Bars"] = nil, ["Active Addons"] = "Accesorios activos", ["Add button to the frame"] = "Añadir botón al marco", ["Added button"] = "Botón añadido", @@ -80,7 +81,7 @@ pfUI_translation["esES"] = { ["Buffbar Width"] = "Ancho de la barra de beneficios", ["Buff/Debuff Icons"] = "Iconos de los beneficios/perjuicios", ["Buff/Debuff Indicators"] = "Indicadores de beneficios/perjuicios", - ["Buff Font Size"] = "Tamaño de la fuente de beneficios", + ["Buff Indicators"] = nil, ["Buff Limit"] = "Límite de beneficios", ["Buff Position"] = "Posición de los beneficios", ["Buffs"] = "Beneficios", @@ -151,19 +152,13 @@ pfUI_translation["esES"] = { ["Configuration"] = "Configuración", ["Configure"] = "Configurar", ["Cooldown"] = "Reutilización", + ["Cooldown Color (5 Seconds Or Less)"] = nil, ["Cooldown Color (Days)"] = "Color de reutilización (días)", ["Cooldown Color (Hours)"] = "Color de reutilización (horas)", - ["Cooldown Color (Less than 3 Sec)"] = "Color de reutilización (menos de 3 segundos)", ["Cooldown Color (Minutes)"] = "Color de reutilización (minutos)", ["Cooldown Color (Seconds)"] = "Color de reutilización (segundos)", ["Cooldown / Durations"] = nil, - ["Cooldown Text Font"] = nil, - ["Cooldown Text Font Size"] = "Tamaño de la fuente de texto de reutilización", - ["Cooldown Text Font Size (Blizzard Frames)"] = "Tamaño de la fuente del tiempo de reutilización (Marcos de Blizzard)", - ["Cooldown Text Font Size (Foreign Frames)"] = "Tamaño de la fuente del tiempo de reutilización (Marcos ajenos)", - ["Cooldown Text Size"] = "Tamaño del texto del tiempo de reutilización", ["Cooldown Text Threshold"] = nil, - ["Cooldown Text Time Threshold"] = "Umbral del texto del tiempo de reutilización", ["Coordinates Location"] = "Coordenadas de localización", ["Coordinates On Minimap"] = "Coordenadas en el minimapa", ["Copied to clipboard"] = nil, @@ -283,8 +278,6 @@ pfUI_translation["esES"] = { ["Enable Custom Incoming Whispers Layout"] = "Activar disposición de susurros entrantes personalizado", ["Enable Debuff Display"] = "Mostrar los perjuicios", ["Enable Debuffs"] = "Activar los perjuicios", - ["Enable Durations On Blizzard Frames"] = "Activar duración en los marcos de Blizzard", - ["Enable Durations On Foreign Frames"] = "Activar duración en los marcos extranjeros", ["Enable Energy Ticks"] = "Activar tics de energía", ["Enable Extended Guild Information"] = "Activar información de hermandad extendida", ["Enable Frame Shadow"] = "Activar sombra del marco", @@ -342,6 +335,7 @@ pfUI_translation["esES"] = { ["Font"] = "Fuente", ["Font Options"] = "Opciones de fuente", ["Font Padding"] = "Relleno de fuente", + ["Font Size"] = nil, ["Font Style"] = "Estilo de la fuente", ["Force Blizzard Borders (|cffffaaaaExperimental|r)"] = nil, ["fps"] = "ips", @@ -400,7 +394,6 @@ pfUI_translation["esES"] = { ["Hide Channel Names"] = "Ocultar nombres de canales", ["Hide Chat When Bags Are Opened"] = "Ocultar el chat al abrir las bolsas", ["Hide Combat Log"] = "Ocultar el registro del combate", - ["Hide Foreign Cooldown Animations"] = "Esconde animaciones de reutilización externas", ["Hide Group Frames While In Raid"] = "Ocultar los marcos de grupo mientras estés en banda", ["Hide Healthbar On Critters"] = "Esconder la barra de salud con las alimañas", ["Hide Healthbar On Enemy NPCs"] = "Esconder la barra de salud con los PNJs enemigos", @@ -409,6 +402,7 @@ pfUI_translation["esES"] = { ["Hide Healthbar On Friendly Players"] = "Esconder la barra de salud con los jugadores amistosos", ["Hide Healthbar On Neutral NPCs"] = "Esconder la barra de salud con los PNJs neutrales", ["Hide Healthbar On Totems"] = "Esconder la barra de salud con los tótems", + ["Hide Numbers On Spell Cooldowns Up To (Seconds)"] = nil, ["Hide Timeout"] = "Ocultar temporizador", ["Hide When Entering Combat"] = "Ocultar si entras combate", ["Highlight Equipped Items"] = "Resaltar objetos equipados", @@ -481,6 +475,7 @@ pfUI_translation["esES"] = { ["Look & Feel"] = nil, ["Loot"] = "Botín", ["Loot & Spam"] = "Botín y spam", + ["Loss Of Control"] = nil, ["Macro Text Color"] = "Color de texto de macros", ["Macro Text Size"] = "Tamaño de texto de macros", ["Main Actionbar"] = "Barra de acción principal", @@ -520,6 +515,7 @@ pfUI_translation["esES"] = { ["Name | Health Missing"] = "Nombre | Falta de salud", ["Name (Linebreak) -Health Missing"] = nil, ["Nameplate Border Size"] = "Tamaño del borde de las placas de nombre", + ["Nameplate Debuffs"] = nil, ["Nameplates"] = "Placas identificativas", ["Nameplate Width"] = "Ancho de las placas identificativas", ["Name (Short)"] = "Nombre (corto)", @@ -558,6 +554,7 @@ pfUI_translation["esES"] = { ["On State Change"] = "En un cambio de estado", ["Options"] = "Opciones", ["Orientation"] = "Orientación", + ["Other Addons"] = nil, ["Other Panel: Minimap"] = "Otro panel: minimapa", ["Outline"] = "Contorno", ["Outlines"] = "Contornos", @@ -586,6 +583,7 @@ pfUI_translation["esES"] = { ["Pixel"] = "Píxel", ["Player"] = "Jugador", ["Player Buff Bar"] = "Barra de beneficios del jugador", + ["Player Buffs"] = nil, ["Player Castbar"] = "Barra de lanzamiento del jugador", ["Player Debuff Bar"] = "Barra de perjuicios del jugador", ["Player SP/Haste Display"] = nil, @@ -652,6 +650,7 @@ pfUI_translation["esES"] = { ["Resting"] = "Descansando", ["Reveal Unexplored Areas"] = "Mostrar áreas no exploradas", ["Switch to current zone"] = "Ir a la zona actual", + ["Reverse Sweep On"] = nil, ["Right"] = "Derecho", ["Right Actionbar"] = "Barra de acción derecha", ["Right Anchor"] = nil, @@ -673,6 +672,7 @@ pfUI_translation["esES"] = { ["Save & Reload"] = nil, ["Scale"] = "Escala", ["Scale Border On HiDPI Displays"] = "Escalar los bordes en las pantallas con DPI alto", + ["Scale Font Size With Icon"] = nil, ["Scaling"] = "Escalada", ["Screen Edge Glow Intensity"] = "Intensidad de brillo en los bordes de la pantalla", ["Screen Resolution"] = "Resolución de pantalla", @@ -732,7 +732,7 @@ pfUI_translation["esES"] = { ["Show Loot Icon"] = "Mostrar icono de botín", ["Show Macro Text"] = "Mostrar texto de macro", ["Show Meters By Default"] = "Mostrar medidores por defecto", - ["Show Milliseconds When Timer Runs Out"] = "Mostrar milisegundos cuando el temporizador se acaba", + ["Show Numbers On"] = nil, ["Show On Friendly Units"] = "Mostrar en unidades amistosas", ["Show On Hostile Units"] = "Mostrar en unidades enemigas", ["Show Procs Indicators"] = "Mostrar indicadores de beneficios temporales activados", @@ -750,10 +750,10 @@ pfUI_translation["esES"] = { ["Show Spell Icon"] = "Mostrar icono de hechizo", ["Show Spell Name"] = nil, ["Show Stacks"] = "Mostrar pilas", + ["Show Sweep On"] = nil, + ["Show Tenths Below 5 Seconds"] = nil, ["Show Text"] = nil, - ["Show Time Left"] = "Mostrar el tiempo restante", ["Show Timer"] = nil, - ["Show Timer Animation"] = "Mostrar la animación del temporizador", ["Show Timer Text"] = "Mostrar el texto del temporizador", ["Show Totems Indicators"] = "Mostrar los indicadores de tótems", ["Shrink & Return"] = "Encogerse y volver", @@ -770,8 +770,10 @@ pfUI_translation["esES"] = { ["Soulshards"] = "Fragmentos de alma", ["Spacing"] = "Espaciado", ["Special Recipient"] = "Destinatario especial", + ["Spellbook And Character"] = nil, ["Spell Power Color"] = nil, ["Square"] = "Cuadrado", + ["Stack Count Font Size"] = nil, ["Stance Bar 1"] = "Barra de actitud 1", ["Stance Bar 2"] = "Barra de actitud 2", ["Stance Bar 3"] = "Barra de actitud 3", @@ -806,7 +808,6 @@ pfUI_translation["esES"] = { ["Thistle Tea"] = nil, ["Threshold To Trust Health Estimation"] = "Umbral para confiar en la estimación de salud", ["Time"] = "Tiempo", - ["Timer"] = "Temporizador", ["Time Remaining"] = "Tiempo restante", ["Timer In Minutes"] = "Temporizador en minutos", ["Timestamp Brackets"] = "Corchetes de marca de tiempo", @@ -817,6 +818,7 @@ pfUI_translation["esES"] = { ["Tiny (PixelPerfect)"] = "Minúsculo (píxel perfecta)", ["Toggle as Tank"] = "Alternar si eres el tanque", ["Tooltip"] = "Descripción emergente", + ["Tooltip Auras"] = nil, ["Tooltip Position"] = "Posición de la descripción emergente", ["Tooltip Text Font"] = nil, ["Tooltip Text Font Size"] = nil, @@ -828,11 +830,13 @@ pfUI_translation["esES"] = { ["Total Gold"] = "Oro Total", ["Totem Direction"] = "Dirección del tótem", ["Totem Icons"] = "Iconos de los tótems", + ["Totems"] = nil, ["Tracked Reputation"] = "Reputación rastreada", ["Tracking Icon Size"] = "Tamaño del icono de rastreo", ["Trigger Actions On Key Down"] = "Disparar acciones por presionar la tecla abajo", ["UI-Scale"] = "Escala de IU", ["Unbuffed"] = "Sin beneficios", + ["Unit Frame Auras"] = nil, ["Unit Frame Border Size"] = "Tamaño del borde del marco de unidad", ["Unit Frame Layout"] = "Disposición del Marco de unidad", ["Unit Frames"] = "Marcos de unidad", @@ -859,7 +863,6 @@ pfUI_translation["esES"] = { ["Use Custom Color Power Bar Background"] = "Usar un color personalizado para el fondo de la barra de poder", ["Use Custom Font Settings"] = "Usar las opciones de fuente personalizada", ["Use Custom Spell Power Color (unchecked = biggest school color)"] = nil, - ["Use Dynamic Font Size"] = "Usar un tamaño de fuente dinámico", ["Use Item Rarity Color For Loot-Roll Timer"] = "Usar el color de la rareza del objeto para el temporizador de tirar los dados", ["Use Original Game Fonts"] = nil, ["Use Raid Frames To Display Group Members"] = "Usar marcos de la banda para mostrar miembros del grupo", diff --git a/env/translations_frFR.lua b/env/translations_frFR.lua index 20788f7f..d99cb5a9 100644 --- a/env/translations_frFR.lua +++ b/env/translations_frFR.lua @@ -8,6 +8,7 @@ pfUI_translation["frFR"] = { ["Actionbar"] = "Barre d'action", ["Action Bar"] = "Barre d'action", ["Action Bar Border Size"] = "Taille de la bordure de la barre d'action", + ["Action Bars"] = nil, ["Active Addons"] = "Addons Actif", ["Add button to the frame"] = "Ajoute un bouton au cadre", ["Added button"] = "Bouton ajouté", @@ -80,7 +81,7 @@ pfUI_translation["frFR"] = { ["Buffbar Width"] = "Largeur de la barre des Améliorations", ["Buff/Debuff Icons"] = "Icones de Améliorations/Affaiblissements", ["Buff/Debuff Indicators"] = nil, - ["Buff Font Size"] = "Taille de la police des Améliorations", + ["Buff Indicators"] = nil, ["Buff Limit"] = "Limite des améliorations", ["Buff Position"] = "Position des améliorations", ["Buffs"] = "Buffs", @@ -151,19 +152,13 @@ pfUI_translation["frFR"] = { ["Configuration"] = "Configuration", ["Configure"] = "Configurer", ["Cooldown"] = "Temps de recharge", + ["Cooldown Color (5 Seconds Or Less)"] = nil, ["Cooldown Color (Days)"] = "Couleur des temps de recharge (Jours)", ["Cooldown Color (Hours)"] = "Couleur des temps de recharge (Heures)", - ["Cooldown Color (Less than 3 Sec)"] = "Couleur des temps de recharge (Moins de 3 secondes)", ["Cooldown Color (Minutes)"] = "Couleur des temps de recharge (Minutes)", ["Cooldown Color (Seconds)"] = "Couleur des temps de recharge (Secondes)", ["Cooldown / Durations"] = nil, - ["Cooldown Text Font"] = nil, - ["Cooldown Text Font Size"] = "Taille de la police du texte des temps de recharge", - ["Cooldown Text Font Size (Blizzard Frames)"] = "Taille de la police du texte des temps de recharge (Blizzard Frames)", - ["Cooldown Text Font Size (Foreign Frames)"] = "Taille de la police du texte des temps de recharge (Foreign Frames)", - ["Cooldown Text Size"] = nil, ["Cooldown Text Threshold"] = nil, - ["Cooldown Text Time Threshold"] = "Seuil du texte des temps de recharge", ["Coordinates Location"] = "Coordonnées Emplacement", ["Coordinates On Minimap"] = "Coordonnées sur la mini-carte", ["Copied to clipboard"] = nil, @@ -283,8 +278,6 @@ pfUI_translation["frFR"] = { ["Enable Custom Incoming Whispers Layout"] = "Activer la personnalisation de la fenêtre des Chuchotements entrants", ["Enable Debuff Display"] = "Activer l'affichage des Affaiblissements", ["Enable Debuffs"] = "Activer les affaiblissements", - ["Enable Durations On Blizzard Frames"] = "Activer les durées sur les cadres Blizzard", - ["Enable Durations On Foreign Frames"] = "Activer les durées sur les cadres extérieur", ["Enable Energy Ticks"] = "Activer la barre de rechargement d'énergie", ["Enable Extended Guild Information"] = "Activer les informations de guilde étendues", ["Enable Frame Shadow"] = "Activer l'ombre des cadres", @@ -342,6 +335,7 @@ pfUI_translation["frFR"] = { ["Font"] = "Police de caractère", ["Font Options"] = "Options de la Police", ["Font Padding"] = "Remplissage de la police", + ["Font Size"] = nil, ["Font Style"] = "Style de la police", ["Force Blizzard Borders (|cffffaaaaExperimental|r)"] = nil, ["fps"] = "fps", @@ -400,7 +394,6 @@ pfUI_translation["frFR"] = { ["Hide Channel Names"] = "Masquer le nom des canaux", ["Hide Chat When Bags Are Opened"] = "Masquer le chat quand les sacs sont ouverts", ["Hide Combat Log"] = "Masquer le journal de combat", - ["Hide Foreign Cooldown Animations"] = "Masquer les animations de temps de recharge étrangères", ["Hide Group Frames While In Raid"] = "Masquer l'UI Groupe en Raid", ["Hide Healthbar On Critters"] = "Masquer la barre de vie des bêtes", ["Hide Healthbar On Enemy NPCs"] = "Masquer la barre de vie des PNJs ennemis", @@ -409,6 +402,7 @@ pfUI_translation["frFR"] = { ["Hide Healthbar On Friendly Players"] = "Masquer la barre de vie des joueurs amicaux", ["Hide Healthbar On Neutral NPCs"] = "Masquer la barre de vie des PNJs neutre", ["Hide Healthbar On Totems"] = "Masquer la barre de vie des totems", + ["Hide Numbers On Spell Cooldowns Up To (Seconds)"] = nil, ["Hide Timeout"] = "Masquer le délai d'expiration", ["Hide When Entering Combat"] = "Masquer lors de l'entrée en combat", ["Highlight Equipped Items"] = "Mettre en surbrillance les objets équipés", @@ -481,6 +475,7 @@ pfUI_translation["frFR"] = { ["Look & Feel"] = nil, ["Loot"] = "Butin", ["Loot & Spam"] = "Butin & Spam", + ["Loss Of Control"] = nil, ["Macro Text Color"] = "Couleur du texte de la macro", ["Macro Text Size"] = "Taille du texte de la macro", ["Main Actionbar"] = "Barre d'action principale", @@ -520,6 +515,7 @@ pfUI_translation["frFR"] = { ["Name | Health Missing"] = "Nom | santé manquante", ["Name (Linebreak) -Health Missing"] = nil, ["Nameplate Border Size"] = "Taille de la bordure des barres de vie flottantes", + ["Nameplate Debuffs"] = nil, ["Nameplates"] = "Barres de vie flottantes", ["Nameplate Width"] = "Largeur des barres de vie flottantes", ["Name (Short)"] = "Nom (Court)", @@ -558,6 +554,7 @@ pfUI_translation["frFR"] = { ["On State Change"] = "Sur changement d'état", ["Options"] = "Options", ["Orientation"] = "Orientation", + ["Other Addons"] = nil, ["Other Panel: Minimap"] = "Autre panneau : Minicarte", ["Outline"] = "Contour", ["Outlines"] = "Grandes lignes", @@ -586,6 +583,7 @@ pfUI_translation["frFR"] = { ["Pixel"] = "Pixel", ["Player"] = "Joueur", ["Player Buff Bar"] = "Barre des Améliorations du Joueur", + ["Player Buffs"] = nil, ["Player Castbar"] = "Barre d'incantation du Joueur", ["Player Debuff Bar"] = "Barre des Affaiblissements du Joueur", ["Player SP/Haste Display"] = nil, @@ -652,6 +650,7 @@ pfUI_translation["frFR"] = { ["Resting"] = "Au Repos", ["Reveal Unexplored Areas"] = "Révèle les zones non explorées", ["Switch to current zone"] = "Aller à la zone actuelle", + ["Reverse Sweep On"] = nil, ["Right"] = "Droit", ["Right Actionbar"] = "Barre d'action droite", ["Right Anchor"] = nil, @@ -673,6 +672,7 @@ pfUI_translation["frFR"] = { ["Save & Reload"] = nil, ["Scale"] = "Échelle", ["Scale Border On HiDPI Displays"] = "Échelle de bordure sur les écrans HiDPI", + ["Scale Font Size With Icon"] = nil, ["Scaling"] = "Mise à l'échelle", ["Screen Edge Glow Intensity"] = nil, ["Screen Resolution"] = "Résolution d'écran", @@ -732,7 +732,7 @@ pfUI_translation["frFR"] = { ["Show Loot Icon"] = "Afficher l'icône du butin", ["Show Macro Text"] = "Afficher le texte des macros", ["Show Meters By Default"] = "Afficher les compteurs par défaut", - ["Show Milliseconds When Timer Runs Out"] = "Afficher les Millisecondes quand le temps est épuisée", + ["Show Numbers On"] = nil, ["Show On Friendly Units"] = "Afficher sur les unités amicales", ["Show On Hostile Units"] = "Afficher sur les unités hostiles", ["Show Procs Indicators"] = "Afficher les indicateurs de Procs", @@ -750,10 +750,10 @@ pfUI_translation["frFR"] = { ["Show Spell Icon"] = "Afficher l'icone des sorts", ["Show Spell Name"] = nil, ["Show Stacks"] = "Afficher les empilements", + ["Show Sweep On"] = nil, + ["Show Tenths Below 5 Seconds"] = nil, ["Show Text"] = nil, - ["Show Time Left"] = "Afficher le temps restant", ["Show Timer"] = nil, - ["Show Timer Animation"] = nil, ["Show Timer Text"] = nil, ["Show Totems Indicators"] = "Afficher les indicateurs des totems", ["Shrink & Return"] = "Rétrécir et retourner", @@ -770,8 +770,10 @@ pfUI_translation["frFR"] = { ["Soulshards"] = "Pierre d'âme", ["Spacing"] = "Espacement", ["Special Recipient"] = "Recipient spécial", + ["Spellbook And Character"] = nil, ["Spell Power Color"] = nil, ["Square"] = "Carré", + ["Stack Count Font Size"] = nil, ["Stance Bar 1"] = "Barre de posture 1", ["Stance Bar 2"] = "Barre de posture 2", ["Stance Bar 3"] = "Barre de posture 3", @@ -806,7 +808,6 @@ pfUI_translation["frFR"] = { ["Thistle Tea"] = nil, ["Threshold To Trust Health Estimation"] = "Seuil de confiance pour l'estimation de la santé", ["Time"] = "Heure", - ["Timer"] = nil, ["Time Remaining"] = "Temps restant", ["Timer In Minutes"] = "Temps en minutes", ["Timestamp Brackets"] = "Supports des horaires des messages", @@ -817,6 +818,7 @@ pfUI_translation["frFR"] = { ["Tiny (PixelPerfect)"] = "Minuscule (PixelParfait)", ["Toggle as Tank"] = "Basculer en tant que tank", ["Tooltip"] = "Infobulle", + ["Tooltip Auras"] = nil, ["Tooltip Position"] = "Position de l'infobulle", ["Tooltip Text Font"] = nil, ["Tooltip Text Font Size"] = nil, @@ -828,11 +830,13 @@ pfUI_translation["frFR"] = { ["Total Gold"] = "Or Total", ["Totem Direction"] = "Direction des totems", ["Totem Icons"] = "Icones des totems", + ["Totems"] = nil, ["Tracked Reputation"] = nil, ["Tracking Icon Size"] = "Taille de l'icône de suivi", ["Trigger Actions On Key Down"] = "Déclencher des actions sur la touche enfoncée", ["UI-Scale"] = "Echelle de l'interface", ["Unbuffed"] = "Sans Améliorations", + ["Unit Frame Auras"] = nil, ["Unit Frame Border Size"] = "Taille de la bordure des cadres d'unité", ["Unit Frame Layout"] = "Position des cadres d'unité", ["Unit Frames"] = "Cadres d'unités", @@ -859,7 +863,6 @@ pfUI_translation["frFR"] = { ["Use Custom Color Power Bar Background"] = "Utiliser l'arrière-plan de la barre d'alimentation de couleur personnalisée", ["Use Custom Font Settings"] = nil, ["Use Custom Spell Power Color (unchecked = biggest school color)"] = nil, - ["Use Dynamic Font Size"] = "Utiliser la taille de police dynamique", ["Use Item Rarity Color For Loot-Roll Timer"] = "Utiliser la couleur de la rareté de l'objet pour la minuterie du lancer de dés", ["Use Original Game Fonts"] = nil, ["Use Raid Frames To Display Group Members"] = "Utiliser l'UI Raid pour afficher les Membres du Groupe", diff --git a/env/translations_koKR.lua b/env/translations_koKR.lua index c189ea51..968508f3 100644 --- a/env/translations_koKR.lua +++ b/env/translations_koKR.lua @@ -8,6 +8,7 @@ pfUI_translation["koKR"] = { ["Actionbar"] = "액션바", ["Action Bar"] = nil, ["Action Bar Border Size"] = "액션바 테두리 크기", + ["Action Bars"] = nil, ["Active Addons"] = "애드온 활성화", ["Add button to the frame"] = nil, ["Added button"] = nil, @@ -80,7 +81,7 @@ pfUI_translation["koKR"] = { ["Buffbar Width"] = nil, ["Buff/Debuff Icons"] = nil, ["Buff/Debuff Indicators"] = nil, - ["Buff Font Size"] = nil, + ["Buff Indicators"] = nil, ["Buff Limit"] = "버프 한도", ["Buff Position"] = "버프 위치", ["Buffs"] = nil, @@ -151,19 +152,13 @@ pfUI_translation["koKR"] = { ["Configuration"] = "구성", ["Configure"] = nil, ["Cooldown"] = "쿨다운", + ["Cooldown Color (5 Seconds Or Less)"] = nil, ["Cooldown Color (Days)"] = "재사용 대기시간 컬러(일)", ["Cooldown Color (Hours)"] = "재사용 대기시간 컬러(시간)", - ["Cooldown Color (Less than 3 Sec)"] = "재사용 대기시간 컬러(3초전)", ["Cooldown Color (Minutes)"] = "재사용 대기시간 컬러(분)", ["Cooldown Color (Seconds)"] = "재사용 대기시간 컬러(초)", ["Cooldown / Durations"] = nil, - ["Cooldown Text Font"] = nil, - ["Cooldown Text Font Size"] = "재사용 대기시간 텍스트 폰트 크기", - ["Cooldown Text Font Size (Blizzard Frames)"] = nil, - ["Cooldown Text Font Size (Foreign Frames)"] = nil, - ["Cooldown Text Size"] = nil, ["Cooldown Text Threshold"] = nil, - ["Cooldown Text Time Threshold"] = "재사용 대기시간 텍스트 임계 값", ["Coordinates Location"] = nil, ["Coordinates On Minimap"] = "미니맵의 좌표", ["Copied to clipboard"] = nil, @@ -283,8 +278,6 @@ pfUI_translation["koKR"] = { ["Enable Custom Incoming Whispers Layout"] = "사용자 지정 귓속말 레이아웃 활성화", ["Enable Debuff Display"] = nil, ["Enable Debuffs"] = "디버프 활성화", - ["Enable Durations On Blizzard Frames"] = nil, - ["Enable Durations On Foreign Frames"] = nil, ["Enable Energy Ticks"] = "Energy Ticks 활성화", ["Enable Extended Guild Information"] = "길드 정보 확장 사용", ["Enable Frame Shadow"] = nil, @@ -342,6 +335,7 @@ pfUI_translation["koKR"] = { ["Font"] = nil, ["Font Options"] = nil, ["Font Padding"] = nil, + ["Font Size"] = nil, ["Font Style"] = nil, ["Force Blizzard Borders (|cffffaaaaExperimental|r)"] = nil, ["fps"] = "프레임", @@ -400,7 +394,6 @@ pfUI_translation["koKR"] = { ["Hide Channel Names"] = "채널 이름 숨기기", ["Hide Chat When Bags Are Opened"] = nil, ["Hide Combat Log"] = "전투 기록 숨기기", - ["Hide Foreign Cooldown Animations"] = nil, ["Hide Group Frames While In Raid"] = nil, ["Hide Healthbar On Critters"] = nil, ["Hide Healthbar On Enemy NPCs"] = nil, @@ -409,6 +402,7 @@ pfUI_translation["koKR"] = { ["Hide Healthbar On Friendly Players"] = nil, ["Hide Healthbar On Neutral NPCs"] = nil, ["Hide Healthbar On Totems"] = nil, + ["Hide Numbers On Spell Cooldowns Up To (Seconds)"] = nil, ["Hide Timeout"] = nil, ["Hide When Entering Combat"] = nil, ["Highlight Equipped Items"] = nil, @@ -481,6 +475,7 @@ pfUI_translation["koKR"] = { ["Look & Feel"] = nil, ["Loot"] = "룻팅", ["Loot & Spam"] = "룻팅 & 기타", + ["Loss Of Control"] = nil, ["Macro Text Color"] = nil, ["Macro Text Size"] = nil, ["Main Actionbar"] = nil, @@ -520,6 +515,7 @@ pfUI_translation["koKR"] = { ["Name | Health Missing"] = nil, ["Name (Linebreak) -Health Missing"] = nil, ["Nameplate Border Size"] = nil, + ["Nameplate Debuffs"] = nil, ["Nameplates"] = "상바", ["Nameplate Width"] = "상바 넓이", ["Name (Short)"] = nil, @@ -558,6 +554,7 @@ pfUI_translation["koKR"] = { ["On State Change"] = nil, ["Options"] = nil, ["Orientation"] = nil, + ["Other Addons"] = nil, ["Other Panel: Minimap"] = "나머지 패널:미니맵", ["Outline"] = nil, ["Outlines"] = nil, @@ -586,6 +583,7 @@ pfUI_translation["koKR"] = { ["Pixel"] = nil, ["Player"] = "플레이어", ["Player Buff Bar"] = nil, + ["Player Buffs"] = nil, ["Player Castbar"] = nil, ["Player Debuff Bar"] = nil, ["Player SP/Haste Display"] = nil, @@ -652,6 +650,7 @@ pfUI_translation["koKR"] = { ["Resting"] = "휴식", ["Reveal Unexplored Areas"] = nil, ["Switch to current zone"] = nil, + ["Reverse Sweep On"] = nil, ["Right"] = "오른쪽", ["Right Actionbar"] = nil, ["Right Anchor"] = nil, @@ -673,6 +672,7 @@ pfUI_translation["koKR"] = { ["Save & Reload"] = nil, ["Scale"] = nil, ["Scale Border On HiDPI Displays"] = nil, + ["Scale Font Size With Icon"] = nil, ["Scaling"] = nil, ["Screen Edge Glow Intensity"] = nil, ["Screen Resolution"] = "화면 해상도", @@ -732,7 +732,7 @@ pfUI_translation["koKR"] = { ["Show Loot Icon"] = nil, ["Show Macro Text"] = "매크로 텍스트 표시", ["Show Meters By Default"] = nil, - ["Show Milliseconds When Timer Runs Out"] = nil, + ["Show Numbers On"] = nil, ["Show On Friendly Units"] = nil, ["Show On Hostile Units"] = nil, ["Show Procs Indicators"] = nil, @@ -750,10 +750,10 @@ pfUI_translation["koKR"] = { ["Show Spell Icon"] = nil, ["Show Spell Name"] = nil, ["Show Stacks"] = nil, + ["Show Sweep On"] = nil, + ["Show Tenths Below 5 Seconds"] = nil, ["Show Text"] = nil, - ["Show Time Left"] = nil, ["Show Timer"] = nil, - ["Show Timer Animation"] = nil, ["Show Timer Text"] = nil, ["Show Totems Indicators"] = nil, ["Shrink & Return"] = nil, @@ -770,8 +770,10 @@ pfUI_translation["koKR"] = { ["Soulshards"] = "영혼의 조각", ["Spacing"] = nil, ["Special Recipient"] = nil, + ["Spellbook And Character"] = nil, ["Spell Power Color"] = nil, ["Square"] = nil, + ["Stack Count Font Size"] = nil, ["Stance Bar 1"] = nil, ["Stance Bar 2"] = nil, ["Stance Bar 3"] = nil, @@ -806,7 +808,6 @@ pfUI_translation["koKR"] = { ["Thistle Tea"] = nil, ["Threshold To Trust Health Estimation"] = nil, ["Time"] = "시간", - ["Timer"] = nil, ["Time Remaining"] = nil, ["Timer In Minutes"] = nil, ["Timestamp Brackets"] = nil, @@ -817,6 +818,7 @@ pfUI_translation["koKR"] = { ["Tiny (PixelPerfect)"] = nil, ["Toggle as Tank"] = nil, ["Tooltip"] = "툴팁", + ["Tooltip Auras"] = nil, ["Tooltip Position"] = "툴팁위치", ["Tooltip Text Font"] = nil, ["Tooltip Text Font Size"] = nil, @@ -828,11 +830,13 @@ pfUI_translation["koKR"] = { ["Total Gold"] = "총 금", ["Totem Direction"] = nil, ["Totem Icons"] = nil, + ["Totems"] = nil, ["Tracked Reputation"] = nil, ["Tracking Icon Size"] = nil, ["Trigger Actions On Key Down"] = nil, ["UI-Scale"] = "UI-크기", ["Unbuffed"] = nil, + ["Unit Frame Auras"] = nil, ["Unit Frame Border Size"] = "유닛프레임 테두리 크기", ["Unit Frame Layout"] = "유닛프레임 레이아웃", ["Unit Frames"] = "유닛프레임", @@ -859,7 +863,6 @@ pfUI_translation["koKR"] = { ["Use Custom Color Power Bar Background"] = nil, ["Use Custom Font Settings"] = nil, ["Use Custom Spell Power Color (unchecked = biggest school color)"] = nil, - ["Use Dynamic Font Size"] = nil, ["Use Item Rarity Color For Loot-Roll Timer"] = nil, ["Use Original Game Fonts"] = nil, ["Use Raid Frames To Display Group Members"] = nil, diff --git a/env/translations_ruRU.lua b/env/translations_ruRU.lua index 09b926ae..e391f567 100644 --- a/env/translations_ruRU.lua +++ b/env/translations_ruRU.lua @@ -8,6 +8,7 @@ pfUI_translation["ruRU"] = { ["Actionbar"] = "Панель действий", ["Action Bar"] = "Панель действий", ["Action Bar Border Size"] = "Размер границы панели действий", + ["Action Bars"] = nil, ["Active Addons"] = "Активные аддоны", ["Add button to the frame"] = "Добавить кнопку в окно", ["Added button"] = "Добавлена кнопка", @@ -80,7 +81,7 @@ pfUI_translation["ruRU"] = { ["Buffbar Width"] = "Ширина панели баффов", ["Buff/Debuff Icons"] = "Иконки баффов/дебаффов", ["Buff/Debuff Indicators"] = "Индикаторы баффов/дебаффов", - ["Buff Font Size"] = "Размер шрифта баффов", + ["Buff Indicators"] = nil, ["Buff Limit"] = "Предел баффов", ["Buff Position"] = "Расположение баффов", ["Buffs"] = "Баффы", @@ -151,19 +152,13 @@ pfUI_translation["ruRU"] = { ["Configuration"] = "Конфигурация", ["Configure"] = "Применить", ["Cooldown"] = "Восстановление", + ["Cooldown Color (5 Seconds Or Less)"] = nil, ["Cooldown Color (Days)"] = "Цвет восстановления (дни)", ["Cooldown Color (Hours)"] = "Цвет восстановления (часы)", - ["Cooldown Color (Less than 3 Sec)"] = "Цвет восстановления (менее 3 секунд)", ["Cooldown Color (Minutes)"] = "Цвет восстановления (минуты)", ["Cooldown Color (Seconds)"] = "Цвет восстановления (секунды)", ["Cooldown / Durations"] = "Восстановление / Длительность", - ["Cooldown Text Font"] = nil, - ["Cooldown Text Font Size"] = "Текст времени восстановления(CD)", - ["Cooldown Text Font Size (Blizzard Frames)"] = "Текст времени восстановления (окна Blizzard)", - ["Cooldown Text Font Size (Foreign Frames)"] = "Текст времени восстановления (Сторонние окна)", - ["Cooldown Text Size"] = "Размер текста восстановления", ["Cooldown Text Threshold"] = "Текст порога восстановления", - ["Cooldown Text Time Threshold"] = "Порог текста восстановления", ["Coordinates Location"] = "Расположение координат", ["Coordinates On Minimap"] = "Координаты на миникарте", ["Copied to clipboard"] = nil, @@ -283,8 +278,6 @@ pfUI_translation["ruRU"] = { ["Enable Custom Incoming Whispers Layout"] = "Включить пользовательский макет входящего шепота", ["Enable Debuff Display"] = "Включить отображение дебаффов", ["Enable Debuffs"] = "Включить дебаффы", - ["Enable Durations On Blizzard Frames"] = "Включить длительность на окнах Blizzard", - ["Enable Durations On Foreign Frames"] = "Включить длительность на сторонних окнах", ["Enable Energy Ticks"] = "Включить восполнение энергии", ["Enable Extended Guild Information"] = "Включить расширенную информацию о гильдии", ["Enable Frame Shadow"] = "Включить тень окон", @@ -342,6 +335,7 @@ pfUI_translation["ruRU"] = { ["Font"] = "Шрифт", ["Font Options"] = "Шрифт", ["Font Padding"] = "Отступ шрифта", + ["Font Size"] = nil, ["Font Style"] = "Стиль шрифта", ["Force Blizzard Borders (|cffffaaaaExperimental|r)"] = "Границы Blizzard принудительно (|cffffaaaaЭкспериментально|r)", ["fps"] = "кад./сек.", @@ -400,7 +394,6 @@ pfUI_translation["ruRU"] = { ["Hide Channel Names"] = "Скрыть названия каналов", ["Hide Chat When Bags Are Opened"] = "Скрыть чат, когда сумки открыты", ["Hide Combat Log"] = "Скрыть журнал боя", - ["Hide Foreign Cooldown Animations"] = "Скрыть сторонние анимации перезарядки", ["Hide Group Frames While In Raid"] = "Скрыть окно группы, когда в рейде", ["Hide Healthbar On Critters"] = "Скрыть панель здоровья существ", ["Hide Healthbar On Enemy NPCs"] = "Скрыть панель здоровья вражеских NPC", @@ -409,6 +402,7 @@ pfUI_translation["ruRU"] = { ["Hide Healthbar On Friendly Players"] = "Скрыть панель здоровья дружеских игроков", ["Hide Healthbar On Neutral NPCs"] = "Скрыть панель здоровья нейтральных NPC", ["Hide Healthbar On Totems"] = "Скрыть панель здоровья тотемов", + ["Hide Numbers On Spell Cooldowns Up To (Seconds)"] = nil, ["Hide Timeout"] = "Время до скрытия", ["Hide When Entering Combat"] = "Скрыть при вхождении в режим боя", ["Highlight Equipped Items"] = "Выделять экипированные предметы", @@ -481,6 +475,7 @@ pfUI_translation["ruRU"] = { ["Look & Feel"] = "Смотреть и чувствовать", ["Loot"] = "Добыча", ["Loot & Spam"] = "Добыча & Спам", + ["Loss Of Control"] = nil, ["Macro Text Color"] = "Цвет текста макросов", ["Macro Text Size"] = "Размер текста макросов", ["Main Actionbar"] = "Основная", @@ -520,6 +515,7 @@ pfUI_translation["ruRU"] = { ["Name | Health Missing"] = "Имя | Отсутствующее здоровье", ["Name (Linebreak) -Health Missing"] = "Имя (разрыв линии) -Отсутствует здоровье", ["Nameplate Border Size"] = "Размер границы индикатора здоровья", + ["Nameplate Debuffs"] = nil, ["Nameplates"] = "Индикаторы здоровья", ["Nameplate Width"] = "Ширина индикатора здоровья", ["Name (Short)"] = "Короткое имя", @@ -558,6 +554,7 @@ pfUI_translation["ruRU"] = { ["On State Change"] = "Изменение статуса", ["Options"] = "Опции", ["Orientation"] = "Ориентация", + ["Other Addons"] = nil, ["Other Panel: Minimap"] = "Другая панель: миникарта", ["Outline"] = "Контурный", -- font style ["Outlines"] = "Контуры", @@ -586,6 +583,7 @@ pfUI_translation["ruRU"] = { ["Pixel"] = "пиксель", ["Player"] = "Игрок", ["Player Buff Bar"] = "Панель баффов игрока", + ["Player Buffs"] = nil, ["Player Castbar"] = "Панель применения игрока", ["Player Debuff Bar"] = "Панель дебаффов игрока", ["Player SP/Haste Display"] = nil, @@ -652,6 +650,7 @@ pfUI_translation["ruRU"] = { ["Resting"] = "Отдыхающий", ["Reveal Unexplored Areas"] = "Показывать неисследованные области", ["Switch to current zone"] = "Перейти к текущей зоне", + ["Reverse Sweep On"] = nil, ["Right"] = "Справа", ["Right Actionbar"] = "Правая", ["Right Anchor"] = nil, @@ -673,6 +672,7 @@ pfUI_translation["ruRU"] = { ["Save & Reload"] = "Сохранить и перезагрузить", ["Scale"] = "Масштаб", ["Scale Border On HiDPI Displays"] = "Масштабировать границы на HiDPI мониторах", + ["Scale Font Size With Icon"] = nil, ["Scaling"] = "Масштаб интерфейса", ["Screen Edge Glow Intensity"] = "Интенсивность свечения на краях экрана", ["Screen Resolution"] = "Разрешение экрана", @@ -732,7 +732,7 @@ pfUI_translation["ruRU"] = { ["Show Loot Icon"] = "Показать иконку добычи", ["Show Macro Text"] = "Показать текст макросов", ["Show Meters By Default"] = "Показать счетчики по умолчанию", - ["Show Milliseconds When Timer Runs Out"] = "Показать миллисекунды, когда таймер заканчивается", + ["Show Numbers On"] = nil, ["Show On Friendly Units"] = "Показать на дружественных юнитах", ["Show On Hostile Units"] = "Показать на вражеских юнитах", ["Show Procs Indicators"] = "Показать проки (Procs)", @@ -750,10 +750,10 @@ pfUI_translation["ruRU"] = { ["Show Spell Icon"] = "Показать иконку заклинания", ["Show Spell Name"] = "Показать название заклинания", ["Show Stacks"] = "Показать стаки", + ["Show Sweep On"] = nil, + ["Show Tenths Below 5 Seconds"] = nil, ["Show Text"] = nil, - ["Show Time Left"] = "Показать оставшееся время", ["Show Timer"] = "Показать таймер", - ["Show Timer Animation"] = "Показать анимацию таймера", ["Show Timer Text"] = "Показать текст таймера", ["Show Totems Indicators"] = "Показать индикаторы тотемов", ["Shrink & Return"] = "Сжатие и возврат", @@ -770,8 +770,10 @@ pfUI_translation["ruRU"] = { ["Soulshards"] = "Камни душ", ["Spacing"] = "Расстояние", ["Special Recipient"] = "Конкретный получатель", + ["Spellbook And Character"] = nil, ["Spell Power Color"] = nil, ["Square"] = "Квадрат", + ["Stack Count Font Size"] = nil, ["Stance Bar 1"] = "Панель 1-ой стойки", ["Stance Bar 2"] = "Панель 2-ой стойки", ["Stance Bar 3"] = "Панель 3-ей стойки", @@ -806,7 +808,6 @@ pfUI_translation["ruRU"] = { ["Thistle Tea"] = nil, ["Threshold To Trust Health Estimation"] = "Точность подсчетов здоровья", ["Time"] = "Время", - ["Timer"] = "Таймер", ["Time Remaining"] = "Время до нового уровня", ["Timer In Minutes"] = "Таймер в минутах", ["Timestamp Brackets"] = "Скобки отметок времени", @@ -817,6 +818,7 @@ pfUI_translation["ruRU"] = { ["Tiny (PixelPerfect)"] = "Крошечный (идеальный пиксель)", ["Toggle as Tank"] = "Переключить как танк", ["Tooltip"] = "Подсказка", + ["Tooltip Auras"] = nil, ["Tooltip Position"] = "Расположение подсказки", ["Tooltip Text Font"] = nil, ["Tooltip Text Font Size"] = nil, @@ -828,11 +830,13 @@ pfUI_translation["ruRU"] = { ["Total Gold"] = "Всего золота", ["Totem Direction"] = "Направление тотемов", ["Totem Icons"] = "Иконки тотемов", + ["Totems"] = nil, ["Tracked Reputation"] = "Отслеживаемая репутация", ["Tracking Icon Size"] = "Размер иконки отслеживания", ["Trigger Actions On Key Down"] = "Активация действий при нажатии клавиши (а не ее отпускании)", ["UI-Scale"] = "Масштаб пользовательского интерфейса", ["Unbuffed"] = "Без баффа", + ["Unit Frame Auras"] = nil, ["Unit Frame Border Size"] = "Размер границы окна юнита", ["Unit Frame Layout"] = "Макет окна юнита", ["Unit Frames"] = "Окна юнита", @@ -859,7 +863,6 @@ pfUI_translation["ruRU"] = { ["Use Custom Color Power Bar Background"] = "Использовать пользовательский цвет фона панели силы", ["Use Custom Font Settings"] = "Использовать пользовательские настройки шрифта", ["Use Custom Spell Power Color (unchecked = biggest school color)"] = nil, - ["Use Dynamic Font Size"] = "Использовать динамический размер шрифта", ["Use Item Rarity Color For Loot-Roll Timer"] = "Использовать цвет качества предмета для таймера распределения добычи", ["Use Original Game Fonts"] = "Использовать оригинальные игровые шрифты", ["Use Raid Frames To Display Group Members"] = "Использовать окна рейда для отображения членов группы", diff --git a/env/translations_zhCN.lua b/env/translations_zhCN.lua index 58822209..3204b180 100644 --- a/env/translations_zhCN.lua +++ b/env/translations_zhCN.lua @@ -8,6 +8,7 @@ pfUI_translation["zhCN"] = { ["Actionbar"] = "动作条", ["Action Bar"] = "动作条", ["Action Bar Border Size"] = "动作条边框大小", + ["Action Bars"] = nil, ["Active Addons"] = "激活的插件", ["Add button to the frame"] = "添加按钮到框架", ["Added button"] = "已添加按钮", @@ -80,7 +81,7 @@ pfUI_translation["zhCN"] = { ["Buffbar Width"] = "Buff条宽度", ["Buff/Debuff Icons"] = "Buff/Debuff图标", ["Buff/Debuff Indicators"] = "Buff/Debuff指示器", - ["Buff Font Size"] = "Buff字体大小", + ["Buff Indicators"] = nil, ["Buff Limit"] = "Buff总数量", ["Buff Position"] = "Buff显示的位置", ["Buffs"] = "Buff(增益)", @@ -151,19 +152,13 @@ pfUI_translation["zhCN"] = { ["Configuration"] = "配置", ["Configure"] = "配置", ["Cooldown"] = "冷却时间", + ["Cooldown Color (5 Seconds Or Less)"] = nil, ["Cooldown Color (Days)"] = "技能冷却时间颜色[天]", ["Cooldown Color (Hours)"] = "技能冷却时间颜色[时]", - ["Cooldown Color (Less than 3 Sec)"] = "技能冷却时间颜色[少于3秒]", ["Cooldown Color (Minutes)"] = "技能冷却时间颜色[分]", ["Cooldown Color (Seconds)"] = "技能冷却时间颜色[秒]", ["Cooldown / Durations"] = "冷却 / 时长", - ["Cooldown Text Font"] = "Debuff计时字体", - ["Cooldown Text Font Size"] = "Debuff计时文字大小", - ["Cooldown Text Font Size (Blizzard Frames)"] = "Debuff计时文字大小(暴雪姓名板)", - ["Cooldown Text Font Size (Foreign Frames)"] = "Debuff计时文字大小(插件姓名板)", - ["Cooldown Text Size"] = "技能冷却文字大小", ["Cooldown Text Threshold"] = "冷却监控阈值(只监控大于该数值的技能)", - ["Cooldown Text Time Threshold"] = "技能冷却时间文字临界值", ["Coordinates Location"] = "坐标位置", ["Coordinates On Minimap"] = "小地图上的坐标", ["Copied to clipboard"] = nil, @@ -283,8 +278,6 @@ pfUI_translation["zhCN"] = { ["Enable Custom Incoming Whispers Layout"] = "启用私聊样式", ["Enable Debuff Display"] = "启用Debuff显示", ["Enable Debuffs"] = "显示Debuff", - ["Enable Durations On Blizzard Frames"] = "在暴雪栏显示冷却倒计时", - ["Enable Durations On Foreign Frames"] = "在技能栏显示冷却倒计时", ["Enable Energy Ticks"] = "显示能量刻度", ["Enable Extended Guild Information"] = "公会信息扩展显示", ["Enable Frame Shadow"] = "启用框架阴影", @@ -342,6 +335,7 @@ pfUI_translation["zhCN"] = { ["Font"] = "字体", ["Font Options"] = "字体设置", ["Font Padding"] = "字体偏移", + ["Font Size"] = nil, ["Font Style"] = "字体风格", ["Force Blizzard Borders (|cffffaaaaExperimental|r)"] = "强制显示暴雪边框(|cffffaaaa测试功能|r)", ["fps"] = "帧", @@ -400,7 +394,6 @@ pfUI_translation["zhCN"] = { ["Hide Channel Names"] = "隐藏频道名称", ["Hide Chat When Bags Are Opened"] = "打开背包后隐藏聊天框", ["Hide Combat Log"] = "隐藏战斗日志", - ["Hide Foreign Cooldown Animations"] = "隐藏技能冷却动画", ["Hide Group Frames While In Raid"] = "在团队框架下隐藏小队框架", ["Hide Healthbar On Critters"] = "隐藏小动物血条", ["Hide Healthbar On Enemy NPCs"] = "隐藏敌方NPCs血条", @@ -409,6 +402,7 @@ pfUI_translation["zhCN"] = { ["Hide Healthbar On Friendly Players"] = "隐藏友好玩家血条", ["Hide Healthbar On Neutral NPCs"] = "隐藏中立单位血条", ["Hide Healthbar On Totems"] = "隐藏图腾血条", + ["Hide Numbers On Spell Cooldowns Up To (Seconds)"] = nil, ["Hide Timeout"] = "超时隐藏", ["Hide When Entering Combat"] = "进入战斗时隐藏", ["Highlight Equipped Items"] = "高亮已装备的物品", @@ -481,6 +475,7 @@ pfUI_translation["zhCN"] = { ["Look & Feel"] = "外观和风格", ["Loot"] = "拾取", ["Loot & Spam"] = "拾取 & 聊天", + ["Loss Of Control"] = nil, ["Macro Text Color"] = "宏文本颜色", ["Macro Text Size"] = "宏文本大小", ["Main Actionbar"] = "主动作条", @@ -520,6 +515,7 @@ pfUI_translation["zhCN"] = { ["Name | Health Missing"] = "名字 | 失去的生命值", ["Name (Linebreak) -Health Missing"] = "名字 (换行符) -失去的生命值", ["Nameplate Border Size"] = "姓名板边框尺寸", + ["Nameplate Debuffs"] = nil, ["Nameplates"] = "姓名板", ["Nameplate Width"] = "姓名板宽度", ["Name (Short)"] = "名字 (短)", @@ -558,6 +554,7 @@ pfUI_translation["zhCN"] = { ["On State Change"] = "状态改变时", ["Options"] = "设置", ["Orientation"] = "方向", + ["Other Addons"] = nil, ["Other Panel: Minimap"] = "小地图面板", ["Outline"] = "轮廓", ["Outlines"] = "轮廓线", @@ -586,6 +583,7 @@ pfUI_translation["zhCN"] = { ["Pixel"] = "像素", ["Player"] = "玩家", ["Player Buff Bar"] = "玩家Buffs条", + ["Player Buffs"] = nil, ["Player Castbar"] = "玩家施法条", ["Player Debuff Bar"] = "玩家Debuffs条", ["Player SP/Haste Display"] = nil, @@ -652,6 +650,7 @@ pfUI_translation["zhCN"] = { ["Resting"] = "休息中", ["Reveal Unexplored Areas"] = "展示未勘探的地区", ["Switch to current zone"] = nil, + ["Reverse Sweep On"] = nil, ["Right"] = "右边", ["Right Actionbar"] = "右侧动作条", ["Right Anchor"] = "右锚点", @@ -673,6 +672,7 @@ pfUI_translation["zhCN"] = { ["Save & Reload"] = "保存并重载", ["Scale"] = "比例", ["Scale Border On HiDPI Displays"] = "缩放高DPI显示器上的边框", + ["Scale Font Size With Icon"] = nil, ["Scaling"] = "UI缩放", ["Screen Edge Glow Intensity"] = "屏幕边缘发光强度", ["Screen Resolution"] = "屏幕分辨率", @@ -733,7 +733,7 @@ pfUI_translation["zhCN"] = { ["Show Loot Icon"] = "显示拾取权图标", ["Show Macro Text"] = "显示宏的名字", ["Show Meters By Default"] = "由默认显示其他接口表", - ["Show Milliseconds When Timer Runs Out"] = "当冷却即将结束时显示毫秒", + ["Show Numbers On"] = nil, ["Show On Friendly Units"] = "显示友好单位姓名板", ["Show On Hostile Units"] = "显示敌对单位姓名板", ["Show Procs Indicators"] = "显示触发效果计时器", @@ -751,10 +751,10 @@ pfUI_translation["zhCN"] = { ["Show Spell Icon"] = "显示技能图标", ["Show Spell Name"] = "显示技能名称", ["Show Stacks"] = "显示堆叠", + ["Show Sweep On"] = nil, + ["Show Tenths Below 5 Seconds"] = nil, ["Show Text"] = "显示文本", - ["Show Time Left"] = "显示剩余时间", ["Show Timer"] = "显示计时器", - ["Show Timer Animation"] = "显示计时器动画", ["Show Timer Text"] = "显示计时器文本", ["Show Totems Indicators"] = "显示图腾指示器", ["Shrink & Return"] = "收缩 & 返回", @@ -771,8 +771,10 @@ pfUI_translation["zhCN"] = { ["Soulshards"] = "灵魂碎片", ["Spacing"] = "间距", ["Special Recipient"] = "特殊指定角色", + ["Spellbook And Character"] = nil, ["Spell Power Color"] = nil, ["Square"] = "方块", + ["Stack Count Font Size"] = nil, ["Stance Bar 1"] = "姿态动作条 1", ["Stance Bar 2"] = "姿态动作条 2", ["Stance Bar 3"] = "姿态动作条 3", @@ -807,7 +809,6 @@ pfUI_translation["zhCN"] = { ["Thistle Tea"] = "菊花茶", ["Threshold To Trust Health Estimation"] = "信任生命值预估的阈值", ["Time"] = "时间", - ["Timer"] = "计时器", ["Time Remaining"] = "剩余时间", ["Timer In Minutes"] = "计时器(分钟)", ["Timestamp Brackets"] = "时间戳括弧", @@ -818,6 +819,7 @@ pfUI_translation["zhCN"] = { ["Tiny (PixelPerfect)"] = "极小(像素完美)", ["Toggle as Tank"] = "切换成为坦克", ["Tooltip"] = "信息提示框", + ["Tooltip Auras"] = nil, ["Tooltip Position"] = "信息提示框位置", ["Tooltip Text Font"] = "鼠标提示框字体", ["Tooltip Text Font Size"] ="鼠标提示框字体大小", @@ -829,11 +831,13 @@ pfUI_translation["zhCN"] = { ["Total Gold"] = "总黄金", ["Totem Direction"] = "图腾方向", ["Totem Icons"] = "图腾图标", + ["Totems"] = nil, ["Tracked Reputation"] = "被追踪的声望", ["Tracking Icon Size"] = "追踪图标大小", ["Trigger Actions On Key Down"] = "按下即施法", ["UI-Scale"] = "UI缩放比例", ["Unbuffed"] = "该Buff缺失者", + ["Unit Frame Auras"] = nil, ["Unit Frame Border Size"] = "头像边框大小", ["Unit Frame Layout"] = "头像框架样式", ["Unit Frames"] = "头像框架", @@ -860,7 +864,6 @@ pfUI_translation["zhCN"] = { ["Use Custom Color Power Bar Background"] = "使用自定义颜色显示能量值背景", ["Use Custom Font Settings"] = "使用自定义字体设置", ["Use Custom Spell Power Color (unchecked = biggest school color)"] = nil, - ["Use Dynamic Font Size"] = "使用动态字体大小", ["Use Item Rarity Color For Loot-Roll Timer"] = "为战利品Roll点计时框启用物品稀有颜色", ["Use Original Game Fonts"] = "使用游戏原始字体", ["Use Raid Frames To Display Group Members"] = '使用团队框架显示小组成员', diff --git a/env/translations_zhTW.lua b/env/translations_zhTW.lua index 4e946b51..4f44985b 100644 --- a/env/translations_zhTW.lua +++ b/env/translations_zhTW.lua @@ -8,6 +8,7 @@ pfUI_translation["zhTW"] = { ["Actionbar"] = "動作條", ["Action Bar"] = nil, ["Action Bar Border Size"] = "動作條邊框大小", + ["Action Bars"] = nil, ["Active Addons"] = "啟動的外掛程式", ["Add button to the frame"] = nil, ["Added button"] = nil, @@ -80,7 +81,7 @@ pfUI_translation["zhTW"] = { ["Buffbar Width"] = "Buff寬度", ["Buff/Debuff Icons"] = nil, ["Buff/Debuff Indicators"] = nil, - ["Buff Font Size"] = "Buff字體大小", + ["Buff Indicators"] = nil, ["Buff Limit"] = "Buff總數量", ["Buff Position"] = "Buff顯示的位置", ["Buffs"] = "Buff(增益)", @@ -151,19 +152,13 @@ pfUI_translation["zhTW"] = { ["Configuration"] = "配置", ["Configure"] = "設置", ["Cooldown"] = "冷卻時間", + ["Cooldown Color (5 Seconds Or Less)"] = nil, ["Cooldown Color (Days)"] = "技能冷卻時間顏色[天]", ["Cooldown Color (Hours)"] = "技能冷卻時間顏色[時]", - ["Cooldown Color (Less than 3 Sec)"] = "技能冷卻時間顏色[少於3秒]", ["Cooldown Color (Minutes)"] = "技能冷卻時間顏色[分]", ["Cooldown Color (Seconds)"] = "技能冷卻時間顏色[秒]", ["Cooldown / Durations"] = nil, - ["Cooldown Text Font"] = nil, - ["Cooldown Text Font Size"] = "技能冷卻時間文字大小", - ["Cooldown Text Font Size (Blizzard Frames)"] = nil, - ["Cooldown Text Font Size (Foreign Frames)"] = nil, - ["Cooldown Text Size"] = nil, ["Cooldown Text Threshold"] = nil, - ["Cooldown Text Time Threshold"] = "技能冷卻時間文字臨界值", ["Coordinates Location"] = "座標位置", ["Coordinates On Minimap"] = "小地圖上的座標", ["Copied to clipboard"] = nil, @@ -283,8 +278,6 @@ pfUI_translation["zhTW"] = { ["Enable Custom Incoming Whispers Layout"] = "啟用私聊樣式", ["Enable Debuff Display"] = "啟用Debuff顯示", ["Enable Debuffs"] = "顯示Debuff", - ["Enable Durations On Blizzard Frames"] = "啟用持續時間在暴雪框架上", - ["Enable Durations On Foreign Frames"] = "啟用持續時間在外來框架上", ["Enable Energy Ticks"] = "顯示能量刻度", ["Enable Extended Guild Information"] = "公會資訊擴展顯示", ["Enable Frame Shadow"] = "啟用框架陰影", @@ -342,6 +335,7 @@ pfUI_translation["zhTW"] = { ["Font"] = nil, ["Font Options"] = nil, ["Font Padding"] = nil, + ["Font Size"] = nil, ["Font Style"] = nil, ["Force Blizzard Borders (|cffffaaaaExperimental|r)"] = nil, ["fps"] = "幀", @@ -400,7 +394,6 @@ pfUI_translation["zhTW"] = { ["Hide Channel Names"] = "隱藏頻道名稱", ["Hide Chat When Bags Are Opened"] = "打開背包後隱藏聊天框", ["Hide Combat Log"] = "隱藏戰鬥日誌", - ["Hide Foreign Cooldown Animations"] = nil, ["Hide Group Frames While In Raid"] = "在團隊框架下隱藏小隊框架", ["Hide Healthbar On Critters"] = nil, ["Hide Healthbar On Enemy NPCs"] = nil, @@ -409,6 +402,7 @@ pfUI_translation["zhTW"] = { ["Hide Healthbar On Friendly Players"] = nil, ["Hide Healthbar On Neutral NPCs"] = nil, ["Hide Healthbar On Totems"] = nil, + ["Hide Numbers On Spell Cooldowns Up To (Seconds)"] = nil, ["Hide Timeout"] = nil, ["Hide When Entering Combat"] = nil, ["Highlight Equipped Items"] = nil, @@ -481,6 +475,7 @@ pfUI_translation["zhTW"] = { ["Look & Feel"] = nil, ["Loot"] = "拾取", ["Loot & Spam"] = "拾取 & 聊天", + ["Loss Of Control"] = nil, ["Macro Text Color"] = nil, ["Macro Text Size"] = nil, ["Main Actionbar"] = nil, @@ -520,6 +515,7 @@ pfUI_translation["zhTW"] = { ["Name | Health Missing"] = nil, ["Name (Linebreak) -Health Missing"] = nil, ["Nameplate Border Size"] = nil, + ["Nameplate Debuffs"] = nil, ["Nameplates"] = "姓名板", ["Nameplate Width"] = "姓名板高度", ["Name (Short)"] = "名字 (短)", @@ -558,6 +554,7 @@ pfUI_translation["zhTW"] = { ["On State Change"] = nil, ["Options"] = nil, ["Orientation"] = nil, + ["Other Addons"] = nil, ["Other Panel: Minimap"] = "小地圖面板", ["Outline"] = nil, ["Outlines"] = nil, @@ -586,6 +583,7 @@ pfUI_translation["zhTW"] = { ["Pixel"] = nil, ["Player"] = "玩家", ["Player Buff Bar"] = nil, + ["Player Buffs"] = nil, ["Player Castbar"] = nil, ["Player Debuff Bar"] = nil, ["Player SP/Haste Display"] = nil, @@ -652,6 +650,7 @@ pfUI_translation["zhTW"] = { ["Resting"] = "休息中", ["Reveal Unexplored Areas"] = "展示未勘探的地區", ["Switch to current zone"] = nil, + ["Reverse Sweep On"] = nil, ["Right"] = "右邊", ["Right Actionbar"] = nil, ["Right Anchor"] = nil, @@ -673,6 +672,7 @@ pfUI_translation["zhTW"] = { ["Save & Reload"] = nil, ["Scale"] = "比例", ["Scale Border On HiDPI Displays"] = nil, + ["Scale Font Size With Icon"] = nil, ["Scaling"] = nil, ["Screen Edge Glow Intensity"] = nil, ["Screen Resolution"] = "螢幕解析度", @@ -732,7 +732,7 @@ pfUI_translation["zhTW"] = { ["Show Loot Icon"] = nil, ["Show Macro Text"] = "顯示巨集的名字", ["Show Meters By Default"] = "由默認顯示其他介面表", - ["Show Milliseconds When Timer Runs Out"] = nil, + ["Show Numbers On"] = nil, ["Show On Friendly Units"] = nil, ["Show On Hostile Units"] = nil, ["Show Procs Indicators"] = nil, @@ -750,10 +750,10 @@ pfUI_translation["zhTW"] = { ["Show Spell Icon"] = nil, ["Show Spell Name"] = nil, ["Show Stacks"] = nil, + ["Show Sweep On"] = nil, + ["Show Tenths Below 5 Seconds"] = nil, ["Show Text"] = nil, - ["Show Time Left"] = nil, ["Show Timer"] = nil, - ["Show Timer Animation"] = nil, ["Show Timer Text"] = nil, ["Show Totems Indicators"] = nil, ["Shrink & Return"] = nil, @@ -770,8 +770,10 @@ pfUI_translation["zhTW"] = { ["Soulshards"] = "靈魂碎片", ["Spacing"] = nil, ["Special Recipient"] = "特殊指定角色", + ["Spellbook And Character"] = nil, ["Spell Power Color"] = nil, ["Square"] = "方形", + ["Stack Count Font Size"] = nil, ["Stance Bar 1"] = nil, ["Stance Bar 2"] = nil, ["Stance Bar 3"] = nil, @@ -806,7 +808,6 @@ pfUI_translation["zhTW"] = { ["Thistle Tea"] = nil, ["Threshold To Trust Health Estimation"] = nil, ["Time"] = "計時器", - ["Timer"] = nil, ["Time Remaining"] = "剩餘時間", ["Timer In Minutes"] = nil, ["Timestamp Brackets"] = "時間戳括弧", @@ -817,6 +818,7 @@ pfUI_translation["zhTW"] = { ["Tiny (PixelPerfect)"] = "極小(像素完美)", ["Toggle as Tank"] = "切換成為坦克", ["Tooltip"] = "滑鼠提示框", + ["Tooltip Auras"] = nil, ["Tooltip Position"] = "滑鼠提示框位置", ["Tooltip Text Font"] = nil, ["Tooltip Text Font Size"] = nil, @@ -828,11 +830,13 @@ pfUI_translation["zhTW"] = { ["Total Gold"] = "總金量", ["Totem Direction"] = nil, ["Totem Icons"] = nil, + ["Totems"] = nil, ["Tracked Reputation"] = nil, ["Tracking Icon Size"] = "追蹤圖示大小", ["Trigger Actions On Key Down"] = nil, ["UI-Scale"] = "UI縮放比例", ["Unbuffed"] = "該Buff缺失者", + ["Unit Frame Auras"] = nil, ["Unit Frame Border Size"] = "頭像邊框大小", ["Unit Frame Layout"] = "頭像框架樣式", ["Unit Frames"] = "頭像框架", @@ -859,7 +863,6 @@ pfUI_translation["zhTW"] = { ["Use Custom Color Power Bar Background"] = nil, ["Use Custom Font Settings"] = nil, ["Use Custom Spell Power Color (unchecked = biggest school color)"] = nil, - ["Use Dynamic Font Size"] = nil, ["Use Item Rarity Color For Loot-Roll Timer"] = "為戰利品Roll點計時框啟用物品稀有顏色", ["Use Original Game Fonts"] = nil, ["Use Raid Frames To Display Group Members"] = '使用團隊框架顯示小組成員', diff --git a/init/api.xml b/init/api.xml index fd647af5..3a043c35 100644 --- a/init/api.xml +++ b/init/api.xml @@ -1,5 +1,6 @@ + diff --git a/init/modules.xml b/init/modules.xml index 74968298..febafbdc 100644 --- a/init/modules.xml +++ b/init/modules.xml @@ -34,7 +34,6 @@ - diff --git a/modules/actionbar.lua b/modules/actionbar.lua index 3a4f1d61..694b5baf 100644 --- a/modules/actionbar.lua +++ b/modules/actionbar.lua @@ -967,8 +967,6 @@ pfUI:RegisterModule("actionbar", function () local bind_size = tonumber(C.bars.bind_size) local bind_color = { GetStringColor(C.bars.bind_color) } - local cd_size = tonumber(C.bars.cd_size) - local showempty = C.bars["bar"..bar].showempty local showmacro = C.bars["bar"..bar].showmacro local showkybind = C.bars["bar"..bar].showkeybind @@ -978,7 +976,6 @@ pfUI:RegisterModule("actionbar", function () if macro_size == 0 then macro_size = 1 end if count_size == 0 then macro_size = 1 end if bind_size == 0 then macro_size = 1 end - if cd_size == 0 then cd_size = nil end local button_name = "pfActionBar" .. barnames[bar] .. "Button" .. button @@ -1010,11 +1007,7 @@ pfUI:RegisterModule("actionbar", function () f.slot = id -- cooldown - f.cd = CreateFrame("Cooldown", f:GetName() .. "Cooldown", f, "CooldownFrameTemplate") - f.cd.pfCooldownStyleAnimation = 1 - f.cd:SetReverse(C.bars.cooldown_reverse == "1") - f.cd.pfCooldownType = "NOGCD" - f.cd.pfCooldownSize = cd_size + f.cd = CreateCooldown(f, "actionbar", f:GetName() .. "Cooldown") -- icon f.icon = f:CreateTexture(button_name .. "Icon", "BACKGROUND") diff --git a/modules/bags.lua b/modules/bags.lua index 8018bcc4..722fac6b 100644 --- a/modules/bags.lua +++ b/modules/bags.lua @@ -415,11 +415,8 @@ pfUI:RegisterModule("bags", function () -- reaches it after that local slotframe = pfUI.bags[bag].slots[slot].frame local cdname = slotframe:GetName() .. "Cooldown" - slotframe.cd = CreateFrame("Cooldown", cdname, slotframe, "CooldownFrameTemplate") + slotframe.cd = CreateCooldown(slotframe, "bags", cdname) _G[cdname] = slotframe.cd - slotframe.cd.pfCooldownStyleAnimation = 1 - slotframe.cd:SetReverse(C.appearance.bags.cooldown_reverse == "1") - slotframe.cd.pfCooldownType = "NOGCD" if not pfUI.bags[bag].slots[slot].frame.backdrop then CreateBackdrop(pfUI.bags[bag].slots[slot].frame, default_border) diff --git a/modules/buff.lua b/modules/buff.lua index 8349cc76..1b3d1e48 100644 --- a/modules/buff.lua +++ b/modules/buff.lua @@ -16,6 +16,25 @@ pfUI:RegisterModule("buff", function () ScanAuraSlots("player", "HARMFUL", harmfulSlots, 16) end + -- weapon enchants report only their time left, and no event as their + -- charges and time run down, so the OnUpdate below refreshes their buttons + -- too: the charges, and the timer when the enchant was renewed + local function RefreshWeaponButton(buff, timeleft, charges) + timeleft = (timeleft or 0) / 1000 + charges = charges or 0 + buff.stacks:SetText(charges > 1 and charges or "") + + local expires = GetTime() + timeleft + if timeleft <= 0 then + buff.cd:Clear() + buff.cdExpires = nil + elseif not buff.cdExpires or abs(buff.cdExpires - expires) > 1 then + SetCooldownTimeLeft(buff.cd, timeleft) + buff.cdExpires = expires + end + buff.cdStart = nil + end + local function RefreshBuffButton(buff) if buff.btype == "HELPFUL" then if C.buffs.separateweapons == "1" then @@ -57,21 +76,22 @@ pfUI:RegisterModule("buff", function () end end - -- Set Weapon Texture and Border + -- Set Weapon Texture, Border and Timer if buff.mode == "MAINHAND" then buff.texture:SetTexture(GetInventoryItemTexture("player", 16)) buff.backdrop:SetBackdropBorderColor(GetItemQualityColor(GetInventoryItemQuality("player", 16) or 1)) + RefreshWeaponButton(buff, mhtime, mhcharge) elseif buff.mode == "OFFHAND" then buff.texture:SetTexture(GetInventoryItemTexture("player", 17)) buff.backdrop:SetBackdropBorderColor(GetItemQualityColor(GetInventoryItemQuality("player", 17) or 1)) + RefreshWeaponButton(buff, ohtime, ohcharge) end elseif name and (( buff.btype == "HARMFUL" and C.buffs.debuffs == "1" ) or ( buff.btype == "HELPFUL" and C.buffs.buffs == "1" )) then -- Set Buff Texture and Border buff.mode = buff.btype - buff.expirationTime = expirationTime - buff.stackCount = count buff.spellId = spellId buff.texture:SetTexture(icon) + buff.stacks:SetText((count or 0) > 1 and count or "") if buff.btype == "HARMFUL" then local dispelColor = C_UnitAuras.GetAuraDispelTypeColor(dispelType) @@ -79,33 +99,23 @@ pfUI:RegisterModule("buff", function () else buff.backdrop:SetBackdropBorderColor(br,bg,bb,ba) end + + -- start the timer from the aura's duration; permanent auras have none + local start, dur = GetAuraTimer(duration, expirationTime) + if dur <= 0 then + buff.cd:Clear() + buff.cdStart = nil + elseif buff.cdStart == nil or abs(buff.cdStart - start) > .5 or buff.cdDuration ~= dur then + CooldownFrame_SetTimer(buff.cd, start, dur, 1) + buff.cdStart = start + buff.cdDuration = dur + end + buff.cdExpires = nil else buff:Hide() return end - -- drive the sweep from the aura duration (weapon enchants and permanent - -- auras report no usable total, so those buttons stay text-only) - if C.buffs.cooldown_anim == "1" and buff.mode == buff.btype and duration and duration > 0 and expirationTime and expirationTime > 0 then - local now = GetTime() - local timeleft = expirationTime - now - if timeleft > 0 then - local effDuration = duration > timeleft and duration or timeleft - local newStart = now + timeleft - effDuration - if buff.cdStart == nil or abs(buff.cdStart - newStart) > .5 or buff.cdDuration ~= effDuration then - buff.cd:SetCooldown(newStart, effDuration) - buff.cdStart = newStart - buff.cdDuration = effDuration - end - else - buff.cd:Clear() - buff.cdStart = nil - end - else - buff.cd:Clear() - buff.cdStart = nil - end - buff:Show() end @@ -128,29 +138,21 @@ pfUI:RegisterModule("buff", function () buff.texture:SetTexCoord(.07,.93,.07,.93) buff.texture:SetAllPoints(buff) - -- overlay lifts the texts above the sweep: a child frame renders above - -- all of its parent's own regions, so the timer would dim under the - -- dark wedge otherwise + -- overlay lifts the stacks above the sweep: a child frame renders above + -- all of its parent's own regions, so they would dim under the dark + -- wedge otherwise buff.overlay = CreateFrame("Frame", nil, buff) buff.overlay:SetAllPoints(buff) - buff.timer = buff.overlay:CreateFontString(nil, "OVERLAY", "GameFontNormal") - buff.timer:SetTextColor(1,1,1,1) - buff.timer:SetJustifyH("CENTER") - buff.timer:SetJustifyV("CENTER") - buff.stacks = buff.overlay:CreateFontString(nil, "OVERLAY", "GameFontNormal") buff.stacks:SetTextColor(1,1,1,1) buff.stacks:SetJustifyH("RIGHT") buff.stacks:SetJustifyV("BOTTOM") buff.stacks:SetAllPoints(buff) - -- radial sweep (the template covers the button and starts hidden). - -- RefreshBuffButton drives it through the frame's own methods, never - -- CooldownFrame_SetTimer, so the cooldown module's hook leaves it alone; - -- text stays with buff.timer, so the frame's own numbers are hidden - buff.cd = CreateFrame("Cooldown", buttonName .. "Cooldown", buff, "CooldownFrameTemplate") - buff.cd:SetHideCountdownNumbers(true) + -- the sweep and the duration numbers (the template covers the button and + -- starts hidden); RefreshBuffButton starts its timer + buff.cd = CreateCooldown(buff, "buff", buttonName .. "Cooldown") buff.cd:SetFrameLevel(buff:GetFrameLevel() + 1) buff.overlay:SetFrameLevel(buff:GetFrameLevel() + 2) @@ -230,66 +232,24 @@ pfUI:RegisterModule("buff", function () end end) - -- PERF: Consolidated OnUpdate handler for all buff timers - -- This replaces 50 individual OnUpdate handlers with a single one + -- the buttons that can show a weapon enchant: the first two buffs, or the + -- separate weapon buttons + local weaponButtons + + -- weapon enchants, see RefreshWeaponButton pfUI.buff:SetScript("OnUpdate", function() local now = GetTime() if not this.nextUpdate then this.nextUpdate = now + 0.1 end if this.nextUpdate > now then return end this.nextUpdate = now + 0.1 - -- Cache weapon enchant info once per update cycle - local mh, mhtime, mhcharge, oh, ohtime, ohcharge = GetWeaponEnchantInfo() - - -- Update all visible buff buttons - local buttons = pfUI.buff.buffs.buttons - for i = 1, 32 do - local buff = buttons[i] + local _, mhtime, mhcharge, _, ohtime, ohcharge = GetWeaponEnchantInfo() + for _, buff in ipairs(weaponButtons) do if buff:IsShown() then - local timeleft, stacks = 0, 0 - if buff.mode == buff.btype then - timeleft = buff.expirationTime > 0 and (buff.expirationTime - now) or 0 - stacks = buff.stackCount or 0 - elseif buff.mode == "MAINHAND" then - timeleft = mhtime and mhtime / 1000 or 0 - stacks = mhcharge or 0 + if buff.mode == "MAINHAND" then + RefreshWeaponButton(buff, mhtime, mhcharge) elseif buff.mode == "OFFHAND" then - timeleft = ohtime and ohtime / 1000 or 0 - stacks = ohcharge or 0 - end - buff.timer:SetText(timeleft > 0 and GetColoredTimeString(timeleft) or "") - buff.stacks:SetText(stacks > 1 and stacks or "") - end - end - - -- Update all visible debuff buttons - buttons = pfUI.buff.debuffs.buttons - for i = 1, 16 do - local buff = buttons[i] - if buff:IsShown() then - local timeleft = buff.expirationTime > 0 and (buff.expirationTime - now) or 0 - local stacks = buff.stackCount or 0 - buff.timer:SetText(timeleft > 0 and GetColoredTimeString(timeleft) or "") - buff.stacks:SetText(stacks > 1 and stacks or "") - end - end - - -- Update weapon buff buttons if separate - if C.buffs.separateweapons == "1" then - buttons = pfUI.buff.wepbuffs.buttons - for i = 1, 2 do - local buff = buttons[i] - if buff:IsShown() then - local timeleft, stacks = 0, 0 - if buff.mode == "MAINHAND" then - timeleft = mhtime and mhtime / 1000 or 0 - stacks = mhcharge or 0 - elseif buff.mode == "OFFHAND" then - timeleft = ohtime and ohtime / 1000 or 0 - stacks = ohcharge or 0 - end - buff.timer:SetText(timeleft > 0 and GetColoredTimeString(timeleft) or "") - buff.stacks:SetText(stacks > 1 and stacks or "") + RefreshWeaponButton(buff, ohtime, ohcharge) end end end @@ -320,53 +280,55 @@ pfUI:RegisterModule("buff", function () pfUI.buff.debuffs.buttons[i] = CreateBuffButton(i, "HARMFUL") end + weaponButtons = { + pfUI.buff.buffs.buttons[1], pfUI.buff.buffs.buttons[2], + pfUI.buff.wepbuffs.buttons[1], pfUI.buff.wepbuffs.buttons[2], + } + -- config loading function pfUI.buff:UpdateConfigBuffButton(buff) local fontsize = C.buffs.fontsize == "-1" and C.global.font_size or C.buffs.fontsize local buffSize, buffSpacing = tonumber(C.buffs.size), tonumber(C.buffs.spacing) + local rowextra = C.buffs.textinside == "1" and 0 or GetCooldownFontSize(buffSize) * 1.5 local rowcount, relFrame, offsetX, offsetY if buff.btype == "HELPFUL" then if buff.weapon == 1 and C.buffs.separateweapons == "1" then rowcount = floor((buff.gid-1) / tonumber(C.buffs.wepbuffrowsize)) relFrame = pfUI.buff.wepbuffs offsetX = -(buff.gid-1-rowcount*tonumber(C.buffs.wepbuffrowsize))*(buffSize+2*buffSpacing) - offsetY = -(rowcount) * ((C.buffs.textinside == "1" and 0 or (fontsize*1.5))+buffSize+2*buffSpacing) + offsetY = -(rowcount) * (rowextra+buffSize+2*buffSpacing) else rowcount = floor((buff.gid-1) / tonumber(C.buffs.buffrowsize)) relFrame = pfUI.buff.buffs offsetX = -(buff.gid-1-rowcount*tonumber(C.buffs.buffrowsize))*(buffSize+2*buffSpacing) - offsetY = -(rowcount) * ((C.buffs.textinside == "1" and 0 or (fontsize*1.5))+buffSize+2*buffSpacing) + offsetY = -(rowcount) * (rowextra+buffSize+2*buffSpacing) end else rowcount = floor((buff.gid-1) / tonumber(C.buffs.debuffrowsize)) relFrame = pfUI.buff.debuffs offsetX = -(buff.gid-1-rowcount*tonumber(C.buffs.debuffrowsize))*(buffSize+2*buffSpacing) - offsetY = -(rowcount) * ((C.buffs.textinside == "1" and 0 or (fontsize*1.5))+buffSize+2*buffSpacing) + offsetY = -(rowcount) * (rowextra+buffSize+2*buffSpacing) end buff:SetSize(buffSize, buffSize) - buff.cd:SetReverse(C.buffs.cooldown_reverse == "1") buff:ClearAllPoints() buff:SetPoint("TOPRIGHT", relFrame, "TOPRIGHT",offsetX, offsetY) - buff.timer:SetFont(pfUI.font_default, fontsize, "OUTLINE") buff.stacks:SetFont(pfUI.font_default, fontsize+1, "OUTLINE") - buff.timer:SetHeight(fontsize * 1.3) - - buff.timer:ClearAllPoints() + -- the duration numbers sit inside the icon or below it + local countdown = buff.cd:GetCountdownFontString() + countdown:ClearAllPoints() if C.buffs.textinside == "1" then - buff.timer:SetAllPoints(buff) + countdown:SetPoint("CENTER", buff, "CENTER", 0, 0) else - buff.timer:SetPoint("TOP", buff, "BOTTOM", 0, -3) + countdown:SetPoint("TOP", buff, "BOTTOM", 0, -3) end end function pfUI.buff:UpdateConfig() - local fontsize = C.buffs.fontsize == "-1" and C.global.font_size or C.buffs.fontsize - local spacing = tonumber(C.buffs.spacing) local cell = tonumber(C.buffs.size) + 2 * spacing - local rowextra = C.buffs.textinside == "1" and 0 or (fontsize * 1.5) + local rowextra = C.buffs.textinside == "1" and 0 or GetCooldownFontSize(tonumber(C.buffs.size)) * 1.5 local function SizeBuffFrame(frame, rowsize, count) rowsize = tonumber(rowsize) diff --git a/modules/cooldown.lua b/modules/cooldown.lua deleted file mode 100644 index 1d9606ea..00000000 --- a/modules/cooldown.lua +++ /dev/null @@ -1,75 +0,0 @@ -pfUI:RegisterModule("cooldown", function () - -- The numbers are the Cooldown frame's own countdown (ClassicAPI): the - -- engine ticks them, gated by the countdownForCooldowns cvar, and writes - -- them through pfUI's shared formatter. pfUI only configures each frame as - -- its timer is set. - - local function GetCooldownHeight(cooldown) - return cooldown:GetParent() and cooldown:GetParent():GetHeight() or cooldown:GetHeight() or 0 - end - - -- sizes the numbers to the cooldown's current height; the dynamic size - -- follows the frame, so SetCooldown calls this again whenever that height - -- changes - local function UpdateCountdownFont(cooldown) - local size - if not cooldown.pfCooldownType then - size = tonumber(C.appearance.cd.font_size_foreign) - elseif cooldown.pfCooldownType == "BLIZZARD" then - size = tonumber(C.appearance.cd.font_size_blizz) - elseif cooldown.pfCooldownSize then - size = tonumber(cooldown.pfCooldownSize) - else - size = tonumber(C.appearance.cd.font_size) - end - - local height = GetCooldownHeight(cooldown) - cooldown.pfCountdownHeight = height - - -- enforce dynamic font size - if C.appearance.cd.dynamicsize == "1" then - size = math.max((height > 0 and height * .64 or 16), size) - end - - cooldown:GetCountdownFontString():SetFont(pfUI.media[C.appearance.cd.font], size, "OUTLINE") - end - - -- hook - local function SetCooldown(this) - -- 1.12's indicator Models have no countdown and keep the stock timer - if not this:IsObjectType("Cooldown") then return end - - -- no numbers on unknown frames, nor on frames with omnicc's disable flag - if (C.appearance.cd.foreign == "0" and not this.pfCooldownType) or this.noCooldownCount then - this:SetHideCountdownNumbers(true) - return - end - - this:SetHideCountdownNumbers(this.pfCooldownStyleText == 0) - - -- no numbers for global cooldowns, except on frames that time auras - if not this.pfCooldownType or this.pfCooldownType == "NOGCD" then - this:SetMinimumCountdownDuration(tonumber(C.appearance.cd.threshold) * 1000) - else - this:SetMinimumCountdownDuration(0) - end - - this:SetCountdownFormatter(GetCountdownFormatter()) - - -- hide foreign animations; frames that set pfCooldownStyleAnimation - -- configure their own sweep. The draw flags, not alpha, so the numbers - -- stay visible - if not this.pfCooldownStyleAnimation and C.appearance.cd.hideanim == "1" then - this:SetDrawSwipe(false) - this:SetDrawBling(false) - end - - if GetCooldownHeight(this) ~= this.pfCountdownHeight then - UpdateCountdownFont(this) - end - end - - -- hook the SetTimer function that every cooldown, Cooldown frame or - -- stock indicator Model, is driven through. - hooksecurefunc("CooldownFrame_SetTimer", SetCooldown) -end) diff --git a/modules/gui.lua b/modules/gui.lua index a6e16143..44d4dcad 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -1597,22 +1597,51 @@ pfUI:RegisterModule("gui", function () end) CreateGUIEntry(T["Settings"], T["Cooldown"], function() + -- every kind of cooldown CreateCooldown makes, as C.cooldown groups. + -- Other addons' cooldowns only lose numbers or sweep (see + -- api/cooldown.lua), so giving them back takes a reload + local kinds = { + { "actionbar", T["Action Bars"] }, + { "bags", T["Bags"] }, + { "blizzard", T["Spellbook And Character"] }, + { "unitframe", T["Unit Frame Auras"] }, + { "indicator", T["Buff Indicators"] }, + { "nameplate", T["Nameplate Debuffs"] }, + { "buff", T["Player Buffs"] }, + { "tooltip", T["Tooltip Auras"] }, + { "totem", T["Totems"] }, + { "lossofcontrol", T["Loss Of Control"] }, + { "foreign", T["Other Addons"] }, + } + CreateConfig(nil, COUNTDOWN_FOR_COOLDOWNS_TEXT, "CVAR", "countdownForCooldowns", "checkbox") - CreateConfig(U["buff"], T["Show Milliseconds When Timer Runs Out"], C.appearance.cd, "milliseconds", "checkbox") - CreateConfig(nil, T["Cooldown Color (Less than 3 Sec)"], C.appearance.cd, "lowcolor", "color") - CreateConfig(nil, T["Cooldown Color (Seconds)"], C.appearance.cd, "normalcolor", "color") - CreateConfig(nil, T["Cooldown Color (Minutes)"], C.appearance.cd, "minutecolor", "color") - CreateConfig(nil, T["Cooldown Color (Hours)"], C.appearance.cd, "hourcolor", "color") - CreateConfig(nil, T["Cooldown Color (Days)"], C.appearance.cd, "daycolor", "color") - CreateConfig(nil, T["Use Dynamic Font Size"], C.appearance.cd, "dynamicsize", "checkbox") - CreateConfig(nil, T["Cooldown Text Font"], C.appearance.cd, "font", "dropdown", pfUI.gui.dropdowns.fonts) - CreateConfig(nil, T["Cooldown Text Font Size"], C.appearance.cd, "font_size") - CreateConfig(nil, T["Cooldown Text Font Size (Blizzard Frames)"], C.appearance.cd, "font_size_blizz") - CreateConfig(nil, T["Cooldown Text Font Size (Foreign Frames)"], C.appearance.cd, "font_size_foreign") - CreateConfig(nil, T["Cooldown Text Time Threshold"], C.appearance.cd, "threshold") - CreateConfig(nil, T["Enable Durations On Blizzard Frames"], C.appearance.cd, "blizzard", "checkbox") - CreateConfig(nil, T["Enable Durations On Foreign Frames"], C.appearance.cd, "foreign", "checkbox") - CreateConfig(nil, T["Hide Foreign Cooldown Animations"], C.appearance.cd, "hideanim", "checkbox") + CreateConfig(UpdateCooldowns, T["Font"], C.cooldown, "font", "dropdown", pfUI.gui.dropdowns.fonts) + CreateConfig(nil, T["Font Size"], C.cooldown, "font_size") + CreateConfig(nil, T["Scale Font Size With Icon"], C.cooldown, "dynamicsize", "checkbox") + CreateConfig(UpdateCooldowns, T["Hide Numbers On Spell Cooldowns Up To (Seconds)"], C.cooldown, "threshold") + CreateConfig(UpdateCooldowns, T["Show Tenths Below 5 Seconds"], C.cooldown, "milliseconds", "checkbox") + CreateConfig(UpdateCooldowns, T["Cooldown Color (5 Seconds Or Less)"], C.cooldown, "lowcolor", "color") + CreateConfig(UpdateCooldowns, T["Cooldown Color (Seconds)"], C.cooldown, "normalcolor", "color") + CreateConfig(UpdateCooldowns, T["Cooldown Color (Minutes)"], C.cooldown, "minutecolor", "color") + CreateConfig(UpdateCooldowns, T["Cooldown Color (Hours)"], C.cooldown, "hourcolor", "color") + CreateConfig(UpdateCooldowns, T["Cooldown Color (Days)"], C.cooldown, "daycolor", "color") + + CreateConfig(nil, T["Show Numbers On"], nil, nil, "header") + for _, kind in ipairs(kinds) do + CreateConfig(kind[1] ~= "foreign" and UpdateCooldowns or nil, kind[2], C.cooldown[kind[1]], "text", "checkbox") + end + + CreateConfig(nil, T["Show Sweep On"], nil, nil, "header") + for _, kind in ipairs(kinds) do + CreateConfig(kind[1] ~= "foreign" and UpdateCooldowns or nil, kind[2], C.cooldown[kind[1]], "animation", "checkbox") + end + + CreateConfig(nil, T["Reverse Sweep On"], nil, nil, "header") + for _, kind in ipairs(kinds) do + if kind[1] ~= "foreign" then + CreateConfig(UpdateCooldowns, kind[2], C.cooldown[kind[1]], "reverse", "checkbox") + end + end end) CreateGUIEntry(T["Settings"], T["Screenshot"], function() @@ -2325,11 +2354,6 @@ pfUI:RegisterModule("gui", function () CreateConfig(U[c], T["Automatic Level Text Color"], C.unitframes[c], "levelcolor", "checkbox") CreateConfig(U[c], T["Automatic Class Text Color"], C.unitframes[c], "classcolor", "checkbox") - CreateConfig(U[c], T["Timer"], nil, nil, "header") - CreateConfig(U[c], T["Show Timer Text"], C.unitframes[c], "cooldown_text", "checkbox") - CreateConfig(U[c], T["Show Timer Animation"], C.unitframes[c], "cooldown_anim", "checkbox") - CreateConfig(U[c], T["Reverse Timer Animation"], C.unitframes[c], "cooldown_reverse", "checkbox") - CreateConfig(U[c], T["Buffs"], nil, nil, "header") CreateConfig(U[c], T["Buff Position"], C.unitframes[c], "buffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position) CreateConfig(U[c], T["Buff Size"], C.unitframes[c], "buffsize") @@ -2359,7 +2383,6 @@ pfUI:RegisterModule("gui", function () CreateConfig(U[c], T["Buff/Debuff Indicators"], nil, nil, "header") CreateConfig(U[c], T["Enable Indicators"], C.unitframes[c], "buff_indicator", "checkbox") - CreateConfig(U[c], T["Show Time Left"], C.unitframes[c], "indicator_time", "checkbox") CreateConfig(U[c], T["Show Stacks"], C.unitframes[c], "indicator_stacks", "checkbox") CreateConfig(U[c], T["Indicator Size"], C.unitframes[c], "indicator_size") CreateConfig(U[c], T["Indicator Spacing"], C.unitframes[c], "indicator_spacing", "dropdown", pfUI.gui.dropdowns.spacing) @@ -2447,7 +2470,6 @@ pfUI:RegisterModule("gui", function () CreateConfig(nil, T["Bagslots Per Row"], C.appearance.bags, "bagrowlength") CreateConfig(nil, T["Bankslots Per Row"], C.appearance.bags, "bankrowlength") CreateConfig(nil, T["Item Slot Size"], C.appearance.bags, "icon_size") - CreateConfig(Reload, T["Reverse Cooldown Animation"], C.appearance.bags, "cooldown_reverse", "checkbox") CreateConfig(nil, T["Auto Sell Grey Items"], C.global, "autosell", "checkbox") CreateConfig(nil, T["Auto Repair Items"], C.global, "autorepair", "checkbox") CreateConfig(nil, T["Auto Sort When Opening Bags"], C.appearance.bags, "autoSortOnOpen", "checkbox") @@ -2497,9 +2519,7 @@ pfUI:RegisterModule("gui", function () CreateConfig(U["buff"], T["Number Of Buffs Per Row"], C.buffs, "buffrowsize") CreateConfig(U["buff"], T["Number Of Debuffs Per Row"], C.buffs, "debuffrowsize") CreateConfig(U["buff"], T["Show Duration Inside Buff"], C.buffs, "textinside", "checkbox") - CreateConfig(U["buff"], T["Buff Font Size"], C.buffs, "fontsize") - CreateConfig(U["buff"], T["Show Timer Animation"], C.buffs, "cooldown_anim", "checkbox") - CreateConfig(U["buff"], T["Reverse Timer Animation"], C.buffs, "cooldown_reverse", "checkbox") + CreateConfig(U["buff"], T["Stack Count Font Size"], C.buffs, "fontsize") end) CreateGUIEntry(T["Buffs"], T["Totem Icons"], function() @@ -2507,7 +2527,6 @@ pfUI:RegisterModule("gui", function () CreateConfig(U["totems"], T["Icon Size"], C.totems, "iconsize") CreateConfig(U["totems"], T["Spacing"], C.totems, "spacing", "dropdown", pfUI.gui.dropdowns.spacing) CreateConfig(U["totems"], T["Show Background"], C.totems, "showbg", "checkbox") - CreateConfig(U["totems"], T["Reverse Cooldown Animation"], C.totems, "cooldown_reverse", "checkbox") end) CreateGUIEntry(T["Buffs"], T["Player Buff Bar"], function() @@ -2596,8 +2615,6 @@ pfUI:RegisterModule("gui", function () CreateConfig(U["bars"], T["Item Count Text Color"], C.bars, "count_color", "color") CreateConfig(U["bars"], T["Keybind Text Size"], C.bars, "bind_size") CreateConfig(U["bars"], T["Keybind Text Color"], C.bars, "bind_color", "color") - CreateConfig(nil, T["Cooldown Text Size"], C.bars, "cd_size") - CreateConfig(Reload, T["Reverse Cooldown Animation"], C.bars, "cooldown_reverse", "checkbox") CreateConfig(nil, T["Auto Paging"], nil, nil, "header") CreateConfig(U["bars"], T["Switch Pages On Alt Key Press"], C.bars, "pagemasteralt", "checkbox") @@ -2968,10 +2985,6 @@ pfUI:RegisterModule("gui", function () CreateConfig(U["nameplates"], T["Debuff Icon Offset"], C.nameplates, "debuffoffset") CreateConfig(U["nameplates"], T["Debuff Icon Size"], C.nameplates, "debuffsize") CreateConfig(U["nameplates"], T["Show Debuff Stacks"], C.nameplates.debuffs, "showstacks", "checkbox") - CreateConfig(U["nameplates"], T["Enable Debuff Timers"], C.nameplates, "debufftimers", "checkbox") - CreateConfig(U["nameplates"], T["Show Timer Text"], C.nameplates, "debufftext", "checkbox") - CreateConfig(U["nameplates"], T["Show Timer Animation"], C.nameplates, "debuffanim", "checkbox") - CreateConfig(U["nameplates"], T["Reverse Timer Animation"], C.nameplates, "debreverse", "checkbox") CreateConfig(U["nameplates"], T["Filter Mode"], C.nameplates.debuffs, "filter", "dropdown", pfUI.gui.dropdowns.buffbarfilter) CreateConfig(U["nameplates"], T["Blacklist"], C.nameplates.debuffs, "blacklist", "list") diff --git a/modules/lossofcontrol.lua b/modules/lossofcontrol.lua index 7b08d381..7e2561e9 100644 --- a/modules/lossofcontrol.lua +++ b/modules/lossofcontrol.lua @@ -34,10 +34,8 @@ pfUI:RegisterModule("lossofcontrol", function () frame.icon.tex = frame.icon:CreateTexture(nil, "ARTWORK") HandleIcon(frame.icon, frame.icon.tex) - frame.cd = CreateFrame("Cooldown", nil, frame.icon, "CooldownFrameTemplate") + frame.cd = CreateCooldown(frame.icon, "lossofcontrol") frame.cd:SetAllPoints(frame.icon.tex) - frame.cd.pfCooldownStyleAnimation = 1 - frame.cd.pfCooldownType = "ALL" frame.label = frame:CreateFontString(nil, "OVERLAY") frame.label:SetFont(pfUI.font_default, 20, "OUTLINE") diff --git a/modules/nameplates.lua b/modules/nameplates.lua index 54deaa21..3c95b9eb 100644 --- a/modules/nameplates.lua +++ b/modules/nameplates.lua @@ -155,8 +155,6 @@ pfUI:RegisterModule("nameplates", function () cfg.use_unitfonts = C.nameplates.use_unitfonts == "1" cfg.font_size = cfg.use_unitfonts and C.global.font_unit_size or C.global.font_size cfg.hptextformat = C.nameplates.hptextformat - -- NEW: Cache debuff config - cfg.debufftimers = C.nameplates.debufftimers == "1" -- Throttle delays, resolved once instead of per plate per tick. -- libthrottle:Get walks the saved-variable table, a defaults fallback and a @@ -438,11 +436,8 @@ pfUI:RegisterModule("nameplates", function () plate.debuffs[index].stacks:SetJustifyV("BOTTOM") plate.debuffs[index].stacks:SetTextColor(1,1,0) - plate.debuffs[index].cd = CreateFrame("Cooldown", plate.platename.."Debuff"..index.."Cooldown", plate.debuffs[index], "CooldownFrameTemplate") + plate.debuffs[index].cd = CreateCooldown(plate.debuffs[index], "nameplate", plate.platename.."Debuff"..index.."Cooldown") plate.debuffs[index].cd:SetFrameLevel(6) - -- the display settings come from UpdateDebuffConfig, which runs for - -- every new icon before its first timer - plate.debuffs[index].cd.pfCooldownType = "ALL" end local function UpdateDebuffConfig(nameplate, i) @@ -475,16 +470,6 @@ pfUI:RegisterModule("nameplates", function () end nameplate.debuffs[i]:SetSize(debuffsize, debuffsize) - - -- Update cooldown display settings - local cd = nameplate.debuffs[i].cd - cd.pfCooldownStyleText = tonumber(C.nameplates.debufftext) or 1 - cd.pfCooldownStyleAnimation = tonumber(C.nameplates.debuffanim) or 0 - -- the draw flags, not alpha: the plate's SetAlpha copies its alpha down - -- to every child (ClassicAPI keeps 1.12's alpha under default plates) - cd:SetDrawSwipe(C.nameplates.debuffanim == "1") - cd:SetDrawBling(C.nameplates.debuffanim == "1") - cd:SetReverse(C.nameplates.debreverse == "1") end -- create nameplate core @@ -1376,7 +1361,7 @@ nameplates:RegisterUnitEvent("UNIT_SPELLCAST_NOT_INTERRUPTIBLE", "target", "focu plate.debuffs[index].stacks:Hide() end - if duration and timeleft and cfg.debufftimers then + if duration and timeleft then -- C_UnitAuras returns the Spell.dbc base duration, which talents -- can extend past — Shadow Affinity bumps SW:P from 18s to 24s, -- so a fresh cast has timeleft > duration and `now + timeleft - diff --git a/modules/tooltip.lua b/modules/tooltip.lua index 933eed38..f4cbb2aa 100644 --- a/modules/tooltip.lua +++ b/modules/tooltip.lua @@ -216,10 +216,7 @@ pfUI:RegisterModule("tooltip", function () icon.stacks:SetFont(C.tooltip.font_tooltip, C.tooltip.font_tooltip_size, "OUTLINE") icon.stacks:SetTextColor(1, 1, 1, 1) - icon.timer = icon:CreateFontString(nil, "OVERLAY", "GameFontNormal") - icon.timer:SetPoint("CENTER", icon, "CENTER", 0, 0) - icon.timer:SetFont(C.tooltip.font_tooltip, C.tooltip.font_tooltip_size, "OUTLINE") - icon.timer:SetTextColor(1, 1, 1, 1) + icon.cd = CreateCooldown(icon, "tooltip") return icon end @@ -228,18 +225,6 @@ pfUI:RegisterModule("tooltip", function () icon:ClearAllPoints() end) - -- Tick the remaining-time text on the visible icons. OnUpdate only fires - -- while the row is shown, so it stops as soon as the tooltip hides. - pfUI.tooltip.buffs:SetScript("OnUpdate", function() - local now = GetTime() - if (this.tick or 0) > now then return end - this.tick = now + 0.1 - for icon in pfUI.tooltip.buffpool:EnumerateActive() do - local timeleft = icon.expirationTime and icon.expirationTime > 0 and (icon.expirationTime - now) or 0 - icon.timer:SetText(timeleft > 0 and GetColoredTimeString(timeleft) or "") - end - end) - function pfUI.tooltip:UpdateBuffs(unit) pfUI.tooltip.buffpool:ReleaseAll() @@ -253,7 +238,7 @@ pfUI:RegisterModule("tooltip", function () -- table and no per-index re-walk of the aura array local n = ScanAuraSlots(unit, "HELPFUL", auraSlots, BUFF_MAX) for i = 1, n do - local name, texture, applications, _, _, expirationTime = C_UnitAuras.UnitAuraBySlot(unit, auraSlots[i]) + local name, texture, applications, _, duration, expirationTime = C_UnitAuras.UnitAuraBySlot(unit, auraSlots[i]) if not name then break end count = count + 1 @@ -261,9 +246,8 @@ pfUI:RegisterModule("tooltip", function () icon.texture:SetTexture(texture) icon.stacks:SetText(applications and applications > 1 and applications or "") - icon.expirationTime = expirationTime - local timeleft = expirationTime and expirationTime > 0 and (expirationTime - GetTime()) or 0 - icon.timer:SetText(timeleft > 0 and GetColoredTimeString(timeleft) or "") + local start, dur = GetAuraTimer(duration, expirationTime) + CooldownFrame_SetTimer(icon.cd, start, dur, dur > 0 and 1 or 0) if prev then icon:SetPoint("LEFT", prev, "RIGHT", BUFF_SPACING, 0) diff --git a/modules/totems.lua b/modules/totems.lua index 7232be99..41ce3e30 100644 --- a/modules/totems.lua +++ b/modules/totems.lua @@ -113,10 +113,7 @@ pfUI:RegisterModule("totems", function () self.bar[i].cdbg = self.bar[i].cdbg or CreateFrame("Frame", nil, self.bar[i]) self.bar[i].cdbg:SetSize(self.iconsize - 3, self.iconsize - 3) self.bar[i].cdbg:SetPoint("CENTER", self.bar[i], "CENTER", 0, 0) - self.bar[i].cd = self.bar[i].cd or CreateFrame("Cooldown", "pfTotemsBar"..i.."Cooldown", self.bar[i].cdbg, "CooldownFrameTemplate") - self.bar[i].cd.pfCooldownStyleAnimation = 1 - self.bar[i].cd:SetReverse(pfUI_config.totems.cooldown_reverse == "1") - self.bar[i].cd.pfCooldownType = "ALL" + self.bar[i].cd = self.bar[i].cd or CreateCooldown(self.bar[i].cdbg, "totem", "pfTotemsBar"..i.."Cooldown") self.bar[i]:RegisterForClicks("LeftButtonUp", "RightButtonUp") self.bar[i]:SetScript("OnClick", self.OnClick) diff --git a/skins/blizzard/character.lua b/skins/blizzard/character.lua index 04c870f5..9849c46f 100644 --- a/skins/blizzard/character.lua +++ b/skins/blizzard/character.lua @@ -199,8 +199,7 @@ pfUI:RegisterSkin("Character", function () -- name only while that global is unset, so the global is rebound by -- hand; the Model starts hidden and nothing reaches it after that local cdname = "Character"..slotName.."Cooldown" - _G[cdname] = CreateFrame("Cooldown", cdname, frame, "CooldownFrameTemplate") - _G[cdname].pfCooldownType = C.appearance.cd.blizzard == "1" and "BLIZZARD" or nil + _G[cdname] = CreateCooldown(frame, "blizzard", cdname) CreateFontString(frame, "scoreText", "OVERLAY", 12) frame.scoreText:SetPoint("TOPRIGHT", 0, 0) diff --git a/skins/blizzard/spellbook.lua b/skins/blizzard/spellbook.lua index fc061957..57756a3f 100644 --- a/skins/blizzard/spellbook.lua +++ b/skins/blizzard/spellbook.lua @@ -39,8 +39,7 @@ pfUI:RegisterSkin("Spellbook", function () -- the global is rebound by hand; the Model starts hidden and nothing -- reaches it after that local cdname = "SpellButton"..i.."Cooldown" - _G[cdname] = CreateFrame("Cooldown", cdname, button, "CooldownFrameTemplate") - _G[cdname].pfCooldownType = C.appearance.cd.blizzard == "1" and "BLIZZARD" or nil + _G[cdname] = CreateCooldown(button, "blizzard", cdname) _G["SpellButton"..i.."SubSpellName"]:SetTextColor(1, 1, 1) _G["SpellButton"..i.."AutoCastable"]:SetTexture("Interface\\Buttons\\UI-AutoCastableOverlay")