diff --git a/CHANGELOG.md b/CHANGELOG.md index d8169cef..3ca83aea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # CHANGELOG +## Version 90200.01 + +- Added options to toggle and reverse cooldown swipes on UF buffs, player buffs and debuffs, action bars, and the aura + tracker; +- Fixed "Buffs and Debuffs" config. It seems that it's broken for quite some time, sorry about that T_T; +- Player and pet castbars are now detached in the rectangular layout by default; +- Updated embeds. + +![Imgur](https://i.imgur.com/Wgl6p5f.png) + +NOTE: If you're affected by this Russian-Ukrainian conflict or know someone who is, please, stay safe and help each +other out. You aren't alone, we all are gonna make it ❤ + ## Version 90105.06 - Preemptively updated buffs and debuffs to work with 9.2 changes. diff --git a/config/auras.lua b/config/auras.lua index 1fd5cdae..bba05fb0 100644 --- a/config/auras.lua +++ b/config/auras.lua @@ -347,7 +347,7 @@ function CONFIG.CreateAurasPanel(_, order) cooldown = { order = 10, type = "group", - name = L["COOLDOWN_TEXT"], + name = L["COOLDOWN"], inline = true, disabled = isModuleDisabled, get = function(info) @@ -356,8 +356,8 @@ function CONFIG.CreateAurasPanel(_, order) set = function(info, value) if C.db.profile.auras.cooldown[info[#info]] ~= value then C.db.profile.auras.cooldown[info[#info]] = value - AURAS:UpdateHeaders("UpdateConfig") - AURAS:UpdateHeaders("UpdateCooldownConfig") + AURAS:ForEach("UpdateConfig") + AURAS:ForEach("UpdateCooldownConfig") end end, args = { @@ -368,8 +368,8 @@ function CONFIG.CreateAurasPanel(_, order) confirm = CONFIG.ConfirmReset, func = function() CONFIG:CopySettings(D.profile.auras.cooldown, C.db.profile.auras.cooldown) - AURAS:UpdateHeaders("UpdateConfig") - AURAS:UpdateHeaders("UpdateCooldownConfig") + AURAS:ForEach("UpdateConfig") + AURAS:ForEach("UpdateCooldownConfig") end, }, spacer_1 = { @@ -397,8 +397,8 @@ function CONFIG.CreateAurasPanel(_, order) end C.db.profile.auras.cooldown[info[#info]] = value - AURAS:UpdateHeaders("UpdateConfig") - AURAS:UpdateHeaders("UpdateCooldownConfig") + AURAS:ForEach("UpdateConfig") + AURAS:ForEach("UpdateCooldownConfig") end end, }, @@ -412,10 +412,46 @@ function CONFIG.CreateAurasPanel(_, order) if C.db.profile.auras.cooldown[info[#info]] ~= value then C.db.profile.auras.cooldown[info[#info]] = value - AURAS:UpdateHeaders("UpdateConfig") - AURAS:UpdateHeaders("UpdateCooldownConfig") + AURAS:ForEach("UpdateConfig") + AURAS:ForEach("UpdateCooldownConfig") + end + end, + }, + spacer_2 = { + order = 19, + type = "description", + name = " ", + }, + swipe = { + order = 20, + type = "group", + name = L["COOLDOWN_SWIPE"], + inline = true, + get = function(info) + return C.db.profile.auras.cooldown.swipe[info[#info]] + end, + set = function(info, value) + if C.db.profile.auras.cooldown.swipe[info[#info]] ~= value then + C.db.profile.auras.cooldown.swipe[info[#info]] = value + AURAS:ForEach("UpdateConfig") + AURAS:ForEach("UpdateCooldownConfig") end end, + args = { + enabled = { + order = 1, + type = "toggle", + name = L["SHOW"], + }, + reversed = { + order = 2, + type = "toggle", + disabled = function() + return not C.db.profile.auras.cooldown.swipe.enabled + end, + name = L["REVERSE"], + }, + }, }, }, }, diff --git a/config/auratracker.lua b/config/auratracker.lua index 8257160f..87cc6d9e 100644 --- a/config/auratracker.lua +++ b/config/auratracker.lua @@ -125,7 +125,7 @@ function CONFIG.CreateAuraTrackerPanel(_, order) confirm = CONFIG.ConfirmReset, disabled = isModuleDisabled, func = function() - CONFIG:CopySettings(D.char.auratracker, PrC.db.profile.auratracker, {enabled = true, filter = true}) + CONFIG:CopySettings(PrD.profile.auratracker, PrC.db.profile.auratracker, {enabled = true, filter = true}) AURATRACKER:Update() end, }, @@ -282,15 +282,15 @@ function CONFIG.CreateAuraTrackerPanel(_, order) cooldown = { order = 40, type = "group", - name = L["COOLDOWN_TEXT"], + name = L["COOLDOWN"], inline = true, disabled = isModuleDisabled, get = function(info) - return PrC.db.profile.auratracker.cooldown.text[info[#info]] + return PrC.db.profile.auratracker.cooldown[info[#info]] end, set = function(info, value) - if PrC.db.profile.auratracker.cooldown.text[info[#info]] ~= value then - PrC.db.profile.auratracker.cooldown.text[info[#info]] = value + if PrC.db.profile.auratracker.cooldown[info[#info]] ~= value then + PrC.db.profile.auratracker.cooldown[info[#info]] = value AURATRACKER:GetTracker():UpdateConfig() AURATRACKER:GetTracker():UpdateCooldownConfig() end @@ -302,7 +302,7 @@ function CONFIG.CreateAuraTrackerPanel(_, order) name = L["RESTORE_DEFAULTS"], confirm = CONFIG.ConfirmReset, func = function() - CONFIG:CopySettings(D.char.auratracker.cooldown, PrC.db.profile.auratracker.cooldown) + CONFIG:CopySettings(PrD.profile.auratracker.cooldown, PrC.db.profile.auratracker.cooldown) AURATRACKER:GetTracker():UpdateConfig() AURATRACKER:GetTracker():UpdateCooldownConfig() end, @@ -312,26 +312,11 @@ function CONFIG.CreateAuraTrackerPanel(_, order) type = "description", name = " ", }, - enabled = { - order = 10, - type = "toggle", - name = L["SHOW"], - }, exp_threshold = { order = 11, type = "range", name = L["EXP_THRESHOLD"], min = 1, max = 10, step = 1, - get = function() - return PrC.db.profile.auratracker.cooldown.exp_threshold - end, - set = function(_, value) - if PrC.db.profile.auratracker.cooldown.exp_threshold ~= value then - PrC.db.profile.auratracker.cooldown.exp_threshold = value - AURATRACKER:GetTracker():UpdateConfig() - AURATRACKER:GetTracker():UpdateCooldownConfig() - end - end, }, m_ss_threshold = { order = 12, @@ -340,9 +325,6 @@ function CONFIG.CreateAuraTrackerPanel(_, order) desc = L["M_SS_THRESHOLD_DESC"], min = 0, max = 3599, step = 1, softMin = 91, - get = function() - return PrC.db.profile.auratracker.cooldown.m_ss_threshold - end, set = function(info, value) if PrC.db.profile.auratracker.cooldown.m_ss_threshold ~= value then if value < info.option.softMin then @@ -361,29 +343,82 @@ function CONFIG.CreateAuraTrackerPanel(_, order) name = L["S_MS_THRESHOLD"], desc = L["S_MS_THRESHOLD_DESC"], min = 1, max = 10, step = 1, - get = function() - return PrC.db.profile.auratracker.cooldown.s_ms_threshold + }, + spacer_2 = { + order = 19, + type = "description", + name = " ", + }, + swipe = { + order = 20, + type = "group", + name = L["COOLDOWN_SWIPE"], + inline = true, + get = function(info) + return PrC.db.profile.auratracker.cooldown.swipe[info[#info]] end, - set = function(_, value) - if PrC.db.profile.auratracker.cooldown.s_ms_threshold ~= value then - PrC.db.profile.auratracker.cooldown.s_ms_threshold = value - + set = function(info, value) + if PrC.db.profile.auratracker.cooldown.swipe[info[#info]] ~= value then + PrC.db.profile.auratracker.cooldown.swipe[info[#info]] = value AURATRACKER:GetTracker():UpdateConfig() AURATRACKER:GetTracker():UpdateCooldownConfig() end end, + args = { + enabled = { + order = 1, + type = "toggle", + name = L["SHOW"], + }, + reversed = { + order = 2, + type = "toggle", + disabled = function() + return not PrC.db.profile.auratracker.cooldown.swipe.enabled + end, + name = L["REVERSE"], + }, + }, }, - size = { - order = 14, - type = "range", - name = L["SIZE"], - min = 8, max = 48, step = 1, + spacer_3 = { + order = 29, + type = "description", + name = " ", }, - v_alignment = { - order = 15, - type = "select", - name = L["TEXT_VERT_ALIGNMENT"], - values = V_ALIGNMENTS, + text = { + order = 30, + type = "group", + name = L["TEXT"], + inline = true, + get = function(info) + return PrC.db.profile.auratracker.cooldown.text[info[#info]] + end, + set = function(info, value) + if PrC.db.profile.auratracker.cooldown.text[info[#info]] ~= value then + PrC.db.profile.auratracker.cooldown.text[info[#info]] = value + AURATRACKER:GetTracker():UpdateConfig() + AURATRACKER:GetTracker():UpdateCooldownConfig() + end + end, + args = { + enabled = { + order = 1, + type = "toggle", + name = L["SHOW"], + }, + size = { + order = 2, + type = "range", + name = L["SIZE"], + min = 8, max = 48, step = 1, + }, + v_alignment = { + order = 3, + type = "select", + name = L["TEXT_VERT_ALIGNMENT"], + values = V_ALIGNMENTS, + }, + }, }, }, }, diff --git a/config/bars.lua b/config/bars.lua index 9fb9064b..deccbf82 100644 --- a/config/bars.lua +++ b/config/bars.lua @@ -852,7 +852,7 @@ function CONFIG.CreateActionBarsPanel(_, order) cooldown = { order = 30, type = "group", - name = L["COOLDOWN_TEXT"], + name = L["COOLDOWN"], inline = true, disabled = isModuleDisabled, get = function(info) @@ -916,12 +916,47 @@ function CONFIG.CreateActionBarsPanel(_, order) set = function(info, value) if C.db.profile.bars.cooldown[info[#info]] ~= value then C.db.profile.bars.cooldown[info[#info]] = value - BARS:UpdateBars("UpdateConfig") BARS:UpdateBars("UpdateCooldownConfig") end end, }, + spacer_2 = { + order = 19, + type = "description", + name = " ", + }, + swipe = { + order = 20, + type = "group", + name = L["COOLDOWN_SWIPE"], + inline = true, + get = function(info) + return C.db.profile.bars.cooldown.swipe[info[#info]] + end, + set = function(info, value) + if C.db.profile.bars.cooldown.swipe[info[#info]] ~= value then + C.db.profile.bars.cooldown.swipe[info[#info]] = value + BARS:ForEach("UpdateConfig") + BARS:ForEach("UpdateCooldownConfig") + end + end, + args = { + enabled = { + order = 1, + type = "toggle", + name = L["SHOW"], + }, + reversed = { + order = 2, + type = "toggle", + disabled = function() + return not C.db.profile.bars.cooldown.swipe.enabled + end, + name = L["REVERSE"], + }, + }, + }, }, }, action_bar_1 = getOptionsTable_Bar("bar1", 50, L["BAR_1"]), diff --git a/config/unitframes/core.lua b/config/unitframes/core.lua index 2e281124..a21814fb 100644 --- a/config/unitframes/core.lua +++ b/config/unitframes/core.lua @@ -555,7 +555,6 @@ function CONFIG:CreateUnitFramesPanel(order) set = function(info, value) if C.db.profile.units.cooldown[info[#info]] ~= value then C.db.profile.units.cooldown[info[#info]] = value - UNITFRAMES:ForEach("For", "Auras", "UpdateConfig") UNITFRAMES:ForEach("For", "Auras", "UpdateCooldownConfig") end @@ -597,7 +596,6 @@ function CONFIG:CreateUnitFramesPanel(order) end C.db.profile.units.cooldown[info[#info]] = value - UNITFRAMES:ForEach("For", "Auras", "UpdateConfig") UNITFRAMES:ForEach("For", "Auras", "UpdateCooldownConfig") end @@ -612,12 +610,47 @@ function CONFIG:CreateUnitFramesPanel(order) set = function(info, value) if C.db.profile.units.cooldown[info[#info]] ~= value then C.db.profile.units.cooldown[info[#info]] = value - UNITFRAMES:ForEach("For", "Auras", "UpdateConfig") UNITFRAMES:ForEach("For", "Auras", "UpdateCooldownConfig") end end, }, + spacer_2 = { + order = 19, + type = "description", + name = " ", + }, + swipe = { + order = 20, + type = "group", + name = L["COOLDOWN_SWIPE"], + inline = true, + get = function(info) + return C.db.profile.units.cooldown.swipe[info[#info]] + end, + set = function(info, value) + if C.db.profile.units.cooldown.swipe[info[#info]] ~= value then + C.db.profile.units.cooldown.swipe[info[#info]] = value + UNITFRAMES:ForEach("For", "Auras", "UpdateConfig") + UNITFRAMES:ForEach("For", "Auras", "UpdateCooldownConfig") + end + end, + args = { + enabled = { + order = 1, + type = "toggle", + name = L["SHOW"], + }, + reversed = { + order = 2, + type = "toggle", + disabled = function() + return not C.db.profile.units.cooldown.swipe.enabled + end, + name = L["REVERSE"], + }, + }, + }, }, }, -- 9 player = createUnitFramePanel(10, "player", L["PLAYER_FRAME"]), diff --git a/core/cooldown.lua b/core/cooldown.lua index d017a05a..1205c21a 100644 --- a/core/cooldown.lua +++ b/core/cooldown.lua @@ -4,17 +4,11 @@ local E, C, PrC, M, L, P = ns.E, ns.C, ns.PrC, ns.M, ns.L, ns.P -- Lua local _G = getfenv(0) local hooksecurefunc = _G.hooksecurefunc -local m_abs = _G.math.abs local next = _G.next -local unpack = _G.unpack -- Blizz local GetTime = _G.GetTime ---[[ luacheck: globals - CreateFrame UIParent -]] - -- Mine E.Cooldowns = {} local handledCooldowns = {} @@ -24,6 +18,10 @@ local defaults = { exp_threshold = 5, -- [1; 10] m_ss_threshold = 0, -- [91; 3599] s_ms_threshold = 5, -- [1; 10] + swipe = { + enabled = true, + reversed = false, + }, text = { enabled = true, size = 12, @@ -91,12 +89,12 @@ updater:SetScript("OnUpdate", function(_, elapsed) end end) -local function cooldown_Clear(self) +local function clearHook(self) self.Timer:SetText("") activeCooldowns[self] = nil end -local function cooldown_SetCooldown(self, start, duration) +local function setCooldownHook(self, start, duration) if self.config.text.enabled then if duration > 1.5 then activeCooldowns[self] = start + duration @@ -108,7 +106,9 @@ local function cooldown_SetCooldown(self, start, duration) activeCooldowns[self] = nil end -local function cooldown_UpdateFont(self) +local cooldown_proto = {} + +function cooldown_proto:UpdateFont() local config = self.config.text self.Timer:UpdateFont(config.size) @@ -117,7 +117,14 @@ local function cooldown_UpdateFont(self) self.Timer:SetShown(config.enabled) end -local function cooldown_UpdateConfig(self, config) +function cooldown_proto:UpdateSwipe() + local config = self.config.swipe + + self:SetDrawSwipe(config.enabled) + self:SetReverse(config.reversed) +end + +function cooldown_proto:UpdateConfig(config) if config then self.config = E:CopyTable(defaults, self.config) self.config = E:CopyTable(config, self.config) @@ -133,6 +140,8 @@ function E.Cooldowns.Handle(cooldown) return cooldown end + Mixin(cooldown, cooldown_proto) + cooldown:SetDrawBling(false) cooldown:SetDrawEdge(false) cooldown:SetHideCountdownNumbers(true) @@ -148,20 +157,18 @@ function E.Cooldowns.Handle(cooldown) timer:SetPoint("BOTTOMRIGHT", 8, 0) cooldown.Timer = timer - hooksecurefunc(cooldown, "Clear", cooldown_Clear) - hooksecurefunc(cooldown, "SetCooldown", cooldown_SetCooldown) - - cooldown.UpdateConfig = cooldown_UpdateConfig - cooldown.UpdateFont = cooldown_UpdateFont + hooksecurefunc(cooldown, "Clear", clearHook) + hooksecurefunc(cooldown, "SetCooldown", setCooldownHook) cooldown:UpdateConfig(defaults) cooldown:UpdateFont() + cooldown:UpdateSwipe() handledCooldowns[cooldown] = true local start, duration = cooldown:GetCooldownTimes() if start > 0 or duration > 0 then - cooldown_SetCooldown(cooldown, start / 1000, duration / 1000) + setCooldownHook(cooldown, start / 1000, duration / 1000) end return cooldown diff --git a/core/defaults.lua b/core/defaults.lua index 519dbc67..fc9a8c0c 100644 --- a/core/defaults.lua +++ b/core/defaults.lua @@ -427,6 +427,10 @@ D.profile = { exp_threshold = 5, -- [1; 10] m_ss_threshold = 600, -- [91; 3599] s_ms_threshold = 5, -- [1; 10] + swipe = { + enabled = true, + reversed = true, + }, }, inlay = { alpha = 0.8, @@ -513,7 +517,7 @@ D.profile = { enabled = true, latency = true, detached = true, - width_override = 200, + width_override = 226, height = 12, icon = { position = "LEFT", -- "RIGHT", "NONE" @@ -812,8 +816,8 @@ D.profile = { castbar = { enabled = true, latency = true, - detached = false, - width_override = 0, + detached = true, + width_override = 226, height = 12, icon = { position = "LEFT", -- "RIGHT", "NONE" @@ -822,12 +826,12 @@ D.profile = { size = 12, }, point1 = { - p = "TOPRIGHT", + p = "BOTTOM", anchor = "", - detached_anchor = "FRAME", - rP = "BOTTOMRIGHT", + detached_anchor = "UIParent", + rP = "BOTTOM", x = 0, - y = -6, + y = 190, }, }, portrait = { @@ -1016,8 +1020,8 @@ D.profile = { castbar = { enabled = true, latency = true, - detached = false, - width_override = 0, + detached = true, + width_override = 200, height = 12, icon = { position = "LEFT", -- "RIGHT", "NONE" @@ -1026,12 +1030,12 @@ D.profile = { size = 12, }, point1 = { - p = "TOPLEFT", - anchor = "", - detached_anchor = "FRAME", - rP = "BOTTOMLEFT", + p = "BOTTOM", + anchor = "LSPlayerFrameCastbarHolder", + detached_anchor = "LSPlayerFrameCastbarHolder", + rP = "TOP", x = 0, - y = -6, + y = 6, }, }, portrait = { @@ -2161,6 +2165,10 @@ D.profile = { exp_threshold = 5, m_ss_threshold = 120, -- [91; 3599] s_ms_threshold = 5, -- [1; 10] + swipe = { + enabled = true, + reversed = false, + }, }, desaturation = { unusable = true, @@ -2702,6 +2710,10 @@ D.profile = { exp_threshold = 5, -- [1; 10] m_ss_threshold = 600, -- [91; 3599] s_ms_threshold = 5, -- [1; 10] + swipe = { + enabled = false, + reversed = true, + } }, HELPFUL = { size = 32, @@ -2921,6 +2933,10 @@ PrD.profile = { exp_threshold = 5, -- [1; 10] m_ss_threshold = 0, -- [91; 3599] s_ms_threshold = 5, -- [1; 10] + swipe = { + enabled = true, + reversed = true, + }, text = { enabled = true, size = 12, diff --git a/embeds/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua b/embeds/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua index f66086f6..764f431d 100644 --- a/embeds/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua +++ b/embeds/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua @@ -1,13 +1,13 @@ --- AceConfigDialog-3.0 generates AceGUI-3.0 based windows based on option tables. -- @class file -- @name AceConfigDialog-3.0 --- @release $Id: AceConfigDialog-3.0.lua 1248 2021-02-05 14:27:49Z funkehdude $ +-- @release $Id: AceConfigDialog-3.0.lua 1255 2021-11-14 09:14:15Z nevcairiel $ local LibStub = LibStub local gui = LibStub("AceGUI-3.0") local reg = LibStub("AceConfigRegistry-3.0") -local MAJOR, MINOR = "AceConfigDialog-3.0", 81 +local MAJOR, MINOR = "AceConfigDialog-3.0", 82 local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR) if not AceConfigDialog then return end @@ -1368,7 +1368,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin elseif width == "half" then check:SetWidth(width_multiplier / 2) elseif (type(width) == "number") then - control:SetWidth(width_multiplier * width) + check:SetWidth(width_multiplier * width) elseif width == "full" then check.width = "fill" else diff --git a/embeds/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua b/embeds/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua index 54816307..341c0702 100644 --- a/embeds/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua +++ b/embeds/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua @@ -1,4 +1,4 @@ ---[[ $Id: AceGUIWidget-DropDown.lua 1239 2020-09-20 10:22:02Z nevcairiel $ ]]-- +--[[ $Id: AceGUIWidget-DropDown.lua 1257 2022-01-10 16:25:37Z nevcairiel $ ]]-- local AceGUI = LibStub("AceGUI-3.0") -- Lua APIs @@ -351,7 +351,7 @@ end do local widgetType = "Dropdown" - local widgetVersion = 35 + local widgetVersion = 36 --[[ Static data ]]-- @@ -376,7 +376,6 @@ do local function Dropdown_TogglePullout(this) local self = this.obj - PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON if self.open then self.open = nil self.pullout:Close() diff --git a/embeds/oUF b/embeds/oUF index b6ac68be..59068644 160000 --- a/embeds/oUF +++ b/embeds/oUF @@ -1 +1 @@ -Subproject commit b6ac68be2e331f64bca0915241d7cd21a567ec78 +Subproject commit 59068644943e4f0823f59122e191ff709bc3c159 diff --git a/locales/enUS.lua b/locales/enUS.lua index 5ba001e9..aac36c2e 100644 --- a/locales/enUS.lua +++ b/locales/enUS.lua @@ -166,6 +166,7 @@ L["COMMAND_BAR"] = "Command Bar" L["CONFIRM_DELETE"] = "Do you wish to delete \"%s\"?" L["CONFIRM_RESET"] = "Do you wish to reset \"%s\"?" L["COOLDOWN"] = "Cooldown" +L["COOLDOWN_SWIPE"] = "Swipe" L["COOLDOWN_TEXT"] = "Cooldown Text" L["COOLDOWNS"] = "Cooldowns" L["COPY_FROM"] = "Copy from" @@ -422,6 +423,7 @@ L["RESTRICTED_MODE"] = "Restricted Mode" L["RESTRICTED_MODE_DESC"] = [=[Enables artwork, animations and dynamic resizing for the main action bar. |cffdc4436Warning!|r Many action bar customisation options won't be available in this mode.|r]=] +L["REVERSE"] = "Reverse" L["RIGHT"] = "Right" L["RIGHT_DOWN"] = "Right and Down" L["RIGHT_UP"] = "Right and Up" diff --git a/locales/ruRU.lua b/locales/ruRU.lua index 2bd959c7..ea69944d 100644 --- a/locales/ruRU.lua +++ b/locales/ruRU.lua @@ -96,6 +96,7 @@ L["COMMAND_BAR"] = "Панель оплота класса" L["CONFIRM_DELETE"] = "Хотите удалить \"%s\"?" L["CONFIRM_RESET"] = "Хотите сбросить \"%s\"?" L["COOLDOWN"] = "Восстановление" +L["COOLDOWN_SWIPE"] = "Анимация восстановления" L["COOLDOWN_TEXT"] = "Текст восстановления" L["COOLDOWNS"] = "Время восстановления" L["COPY_FROM"] = "Скопировать из" @@ -352,6 +353,7 @@ L["RESTRICTED_MODE"] = "Ограниченный режим" L["RESTRICTED_MODE_DESC"] = [=[Включает оформление, анимацию и динамическое изменение размера главной панели команд. |cffdc4436Внимание!|r Многие настройки панелей команд будут не доступны в этом режиме.|r]=] +L["REVERSE"] = "Обратить" L["RIGHT"] = "Право" L["RIGHT_DOWN"] = "Направо и вниз" L["RIGHT_UP"] = "Вправо и вверх" diff --git a/ls_UI.toc b/ls_UI.toc index 9d2c6431..82237b1a 100644 --- a/ls_UI.toc +++ b/ls_UI.toc @@ -1,6 +1,6 @@ -## Interface: 90105 +## Interface: 90200 ## Author: lightspark -## Version: 90105.06 +## Version: 90200.01 ## Title: LS: |cff1a9fc0UI|r ## Notes: Yet another UI, but this one is a bit special... ## SavedVariablesPerCharacter: LS_UI_CHAR_CONFIG diff --git a/modules/auras/auras.lua b/modules/auras/auras.lua index 80d7256f..50e7f064 100644 --- a/modules/auras/auras.lua +++ b/modules/auras/auras.lua @@ -166,11 +166,11 @@ local function handleButton(button, header) button.Border = border button.Cooldown = E.Cooldowns.Create(button) - button.Cooldown:SetDrawSwipe(false) if button.Cooldown.UpdateConfig then button.Cooldown:UpdateConfig(header.cooldownConfig or {}) button.Cooldown:UpdateFont() + button.Cooldown:UpdateSwipe() end local textParent = CreateFrame("Frame", nil, button) @@ -296,14 +296,12 @@ end local function header_UpdateCooldownConfig(self) if not self.cooldownConfig then self.cooldownConfig = { + swipe = {}, text = {}, } end - self.cooldownConfig.exp_threshold = self._config.cooldown.exp_threshold - self.cooldownConfig.m_ss_threshold = self._config.cooldown.m_ss_threshold - self.cooldownConfig.s_ms_threshold = self._config.cooldown.s_ms_threshold - self.cooldownConfig.text = E:CopyTable(self._config.cooldown.text, self.cooldownConfig.text) + self.cooldownConfig = E:CopyTable(self._config.cooldown, self.cooldownConfig) local buttons = self._buttons or {self:GetChildren()} for _, button in next, buttons do @@ -313,6 +311,7 @@ local function header_UpdateCooldownConfig(self) button.Cooldown:UpdateConfig(self.cooldownConfig) button.Cooldown:UpdateFont() + button.Cooldown:UpdateSwipe() end end @@ -360,7 +359,6 @@ local function createHeader(filter) cd:ClearAllPoints() cd:SetPoint("BOTTOMRIGHT", -1, 1) cd:SetPoint("TOPLEFT", 1, -1) - cd:SetDrawSwipe(false) totem.Cooldown = E.Cooldowns.Handle(cd) end else diff --git a/modules/auratracker/auratracker.lua b/modules/auratracker/auratracker.lua index af0a2312..6730e2c5 100644 --- a/modules/auratracker/auratracker.lua +++ b/modules/auratracker/auratracker.lua @@ -141,14 +141,12 @@ end local function bar_UpdateCooldownConfig(self) if not self.cooldownConfig then self.cooldownConfig = { + swipe = {}, text = {}, } end - self.cooldownConfig.exp_threshold = self._config.cooldown.exp_threshold - self.cooldownConfig.m_ss_threshold = self._config.cooldown.m_ss_threshold - self.cooldownConfig.s_ms_threshold = self._config.cooldown.s_ms_threshold - self.cooldownConfig.text = E:CopyTable(self._config.cooldown.text, self.cooldownConfig.text) + self.cooldownConfig = E:CopyTable(self._config.cooldown, self.cooldownConfig) for _, button in next, self._buttons do if not button.CD.UpdateConfig then @@ -157,6 +155,7 @@ local function bar_UpdateCooldownConfig(self) button.CD:UpdateConfig(self.cooldownConfig) button.CD:UpdateFont() + button.CD:UpdateSwipe() end end diff --git a/modules/bars/core.lua b/modules/bars/core.lua index 0794c363..136e1f28 100644 --- a/modules/bars/core.lua +++ b/modules/bars/core.lua @@ -83,14 +83,12 @@ end local function bar_UpdateCooldownConfig(self) if not self.cooldownConfig then self.cooldownConfig = { + swipe = {}, text = {}, } end - self.cooldownConfig.exp_threshold = self._config.cooldown.exp_threshold - self.cooldownConfig.m_ss_threshold = self._config.cooldown.m_ss_threshold - self.cooldownConfig.s_ms_threshold = self._config.cooldown.s_ms_threshold - self.cooldownConfig.text = E:CopyTable(self._config.cooldown.text, self.cooldownConfig.text) + self.cooldownConfig = E:CopyTable(self._config.cooldown, self.cooldownConfig) local cooldown for _, button in next, self._buttons do @@ -101,6 +99,7 @@ local function bar_UpdateCooldownConfig(self) cooldown:UpdateConfig(self.cooldownConfig) cooldown:UpdateFont() + cooldown:UpdateSwipe() end end diff --git a/modules/unitframes/elements/auras.lua b/modules/unitframes/elements/auras.lua index 119d935a..71641dd9 100644 --- a/modules/unitframes/elements/auras.lua +++ b/modules/unitframes/elements/auras.lua @@ -219,6 +219,7 @@ function element_proto:CreateIcon(index) if button.cd.UpdateConfig then button.cd:UpdateConfig(self.cooldownConfig or {}) button.cd:UpdateFont() + button.cd:UpdateSwipe() end button:SetPushedTexture("") @@ -268,13 +269,12 @@ end function element_proto:UpdateCooldownConfig() if not self.cooldownConfig then self.cooldownConfig = { + swipe = {}, text = {}, } end - self.cooldownConfig.exp_threshold = C.db.profile.units.cooldown.exp_threshold - self.cooldownConfig.m_ss_threshold = C.db.profile.units.cooldown.m_ss_threshold - self.cooldownConfig.s_ms_threshold = C.db.profile.units.cooldown.s_ms_threshold + self.cooldownConfig = E:CopyTable(C.db.profile.units.cooldown, self.cooldownConfig) self.cooldownConfig.text = E:CopyTable(self._config.cooldown.text, self.cooldownConfig.text) for i = 1, self.createdIcons do @@ -284,6 +284,7 @@ function element_proto:UpdateCooldownConfig() self[i].cd:UpdateConfig(self.cooldownConfig) self[i].cd:UpdateFont() + self[i].cd:UpdateSwipe() end end