From b82477a0a210fee4829003cccf4d98a9ee54068d Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Sun, 27 Nov 2022 02:24:38 +0700 Subject: [PATCH 01/13] =?UTF-8?q?=F0=9F=A7=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ls_UI_Options/unitframes/core.lua | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ls_UI_Options/unitframes/core.lua b/ls_UI_Options/unitframes/core.lua index 8ff858f8..f0e72826 100644 --- a/ls_UI_Options/unitframes/core.lua +++ b/ls_UI_Options/unitframes/core.lua @@ -393,10 +393,6 @@ function CONFIG:CreateUnitFramesOptions(order) UNITFRAMES:Create("pet") UNITFRAMES:For("pet", "Update") - - if P:GetModule("Blizzard"):HasCastBars() then - P:GetModule("Blizzard"):UpdateCastBars() - end elseif info[#info] == "target" then UNITFRAMES:Create("target") UNITFRAMES:For("target", "Update") From 275dc8668376aaedbcf6801eb0cf0b5646d613ab Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Sun, 27 Nov 2022 02:53:58 +0700 Subject: [PATCH 02/13] Update embeds --- ls_UI/embeds/LibActionButton-1.0 | 2 +- ls_UI/embeds/oUF | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ls_UI/embeds/LibActionButton-1.0 b/ls_UI/embeds/LibActionButton-1.0 index ed06cd80..38de6ac2 160000 --- a/ls_UI/embeds/LibActionButton-1.0 +++ b/ls_UI/embeds/LibActionButton-1.0 @@ -1 +1 @@ -Subproject commit ed06cd807a8c2593d8e3ceb80e218a9045e0d2b5 +Subproject commit 38de6ac2b9eb08892a3f3191a5ef0c1bf9d2db6c diff --git a/ls_UI/embeds/oUF b/ls_UI/embeds/oUF index 1f38a64f..f28a83b1 160000 --- a/ls_UI/embeds/oUF +++ b/ls_UI/embeds/oUF @@ -1 +1 @@ -Subproject commit 1f38a64f4e3b69b7ca3078d31f689d9b2c0acb96 +Subproject commit f28a83b1e6c3e691f1b7e85135e105521a8856d9 From 9ae5b5d72f00f203418b324a6d8d881764fbffe2 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Sun, 27 Nov 2022 03:59:12 +0700 Subject: [PATCH 03/13] Update oUF --- ls_UI/embeds/oUF | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ls_UI/embeds/oUF b/ls_UI/embeds/oUF index f28a83b1..a8838cd4 160000 --- a/ls_UI/embeds/oUF +++ b/ls_UI/embeds/oUF @@ -1 +1 @@ -Subproject commit f28a83b1e6c3e691f1b7e85135e105521a8856d9 +Subproject commit a8838cd4d1c9a61e847098f347db41b595f33ad2 From c23bb96ee710e53a2e178b1643de5543fec43e52 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Mon, 28 Nov 2022 02:36:27 +0700 Subject: [PATCH 04/13] Update dispel list --- ls_UI/core/utils.lua | 50 +++++++++++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 14 deletions(-) diff --git a/ls_UI/core/utils.lua b/ls_UI/core/utils.lua index 89293e91..c64d7b41 100644 --- a/ls_UI/core/utils.lua +++ b/ls_UI/core/utils.lua @@ -616,20 +616,42 @@ do local dispelTypes = {} E:RegisterEvent("SPELLS_CHANGED", function() - -- Soothe (Druid), Tranquilizing Shot (Hunter) - dispelTypes[""] = IsPlayerSpell(2908) or IsPlayerSpell(19801) -- Enrage - - -- Cleanse Spirit (Shaman), Improved Nature's Cure (Druid), Purify Spirit (Shaman), Remove Corruption (Druid), Remove Curse (Mage) - dispelTypes["Curse"] = IsPlayerSpell(51886) or IsPlayerSpell(392378) or IsPlayerSpell(77130) or IsPlayerSpell(2782) or IsPlayerSpell(475) - - -- Improved Cleanse (Paladin), Cleanse Toxins (Paladin), Improved Detox (Monk), Detox (Monk), Improved Purify (Priest), Purify Disease (Priest) - dispelTypes["Disease"] = IsPlayerSpell(393024) or IsPlayerSpell(213644) or IsPlayerSpell(388874) or IsPlayerSpell(218164) or IsPlayerSpell(390632) or IsPlayerSpell(213634) - - -- Cleanse (Paladin), Detox (Monk), Mass Dispel (Priest), Nature's Cure (Druid), Purify (Priest), Purify Spirit (Shaman) - dispelTypes["Magic"] = IsPlayerSpell(4987) or IsPlayerSpell(115450) or IsPlayerSpell(32375) or IsPlayerSpell(88423) or IsPlayerSpell(527) or IsPlayerSpell(77130) - - -- Improved Cleanse (Paladin), Cleanse Toxins (Paladin), Improved Detox (Monk), Detox (Monk), Improved Nature's Cure (Druid), Remove Corruption (Druid) - dispelTypes["Poison"] = IsPlayerSpell(393024) or IsPlayerSpell(213644) or IsPlayerSpell(388874) or IsPlayerSpell(218164) or IsPlayerSpell(392378) or IsPlayerSpell(2782) + -- Enrage + dispelTypes[""] = IsPlayerSpell(374346) -- Overawe (Evoker) + or IsPlayerSpell(2908) -- Soothe (Druid) + or IsPlayerSpell(19801) -- Tranquilizing Shot (Hunter) + + dispelTypes["Curse"] = IsPlayerSpell(374251) -- Cauterizing Flame (Evoker) + or IsPlayerSpell(51886) -- Cleanse Spirit (Shaman) + or IsPlayerSpell(392378) -- Improved Nature's Cure (Druid) + or IsPlayerSpell(383016) -- Improved Purify Spirit (Shaman) + or IsPlayerSpell(2782) -- Remove Corruption (Druid) + or IsPlayerSpell(475) -- Remove Curse (Mage) + + dispelTypes["Disease"] = IsPlayerSpell(374251) -- Cauterizing Flame (Evoker) + or IsPlayerSpell(213644) -- Cleanse Toxins (Paladin) + or IsPlayerSpell(218164) -- Detox (Monk) + or IsPlayerSpell(393024) -- Improved Cleanse (Paladin) + or IsPlayerSpell(388874) -- Improved Detox (Monk) + or IsPlayerSpell(390632) -- Improved Purify (Priest) + or IsPlayerSpell(213634) -- Purify Disease (Priest) + + dispelTypes["Magic"] = IsPlayerSpell(4987) -- Cleanse (Paladin) + or IsPlayerSpell(115450) -- Detox (Monk) + or IsPlayerSpell(32375) -- Mass Dispel (Priest) + or IsPlayerSpell(360823) -- Naturalize (Evoker) + or IsPlayerSpell(88423) -- Nature's Cure (Druid) + or IsPlayerSpell(527) -- Purify (Priest) + or IsPlayerSpell(77130) -- Purify Spirit (Shaman) + + dispelTypes["Poison"] = IsPlayerSpell(374251) -- Cauterizing Flame (Evoker) + or IsPlayerSpell(213644) -- Cleanse Toxins (Paladin) + or IsPlayerSpell(218164) -- Detox (Monk) + or IsPlayerSpell(393024) -- Improved Cleanse (Paladin) + or IsPlayerSpell(388874) -- Improved Detox (Monk) + or IsPlayerSpell(392378) -- Improved Nature's Cure (Druid) + or IsPlayerSpell(360823) -- Naturalize (Evoker) + or IsPlayerSpell(2782) -- Remove Corruption (Druid) end) function E:IsDispellable(debuffType) From 0d37abfb596f8b00fe69414174d290d891f69008 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Mon, 28 Nov 2022 02:36:52 +0700 Subject: [PATCH 05/13] Don't save coords for Blizz frames --- ls_UI/core/utils.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/ls_UI/core/utils.lua b/ls_UI/core/utils.lua index c64d7b41..e4255c9b 100644 --- a/ls_UI/core/utils.lua +++ b/ls_UI/core/utils.lua @@ -766,6 +766,7 @@ function E:ForceHide(object, skipEvents) if object.SetUserPlaced then pcall(object.SetUserPlaced, object, true) + pcall(object.SetDontSavePosition, object, true) end end From 3b9491d565b9821a6c0498c6476a333e03bf5478 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Mon, 28 Nov 2022 19:35:49 +0700 Subject: [PATCH 06/13] Enable clipping on health, power, and add power --- ls_UI/modules/unitframes/elements/health.lua | 1 + ls_UI/modules/unitframes/elements/power.lua | 2 ++ ls_UI/modules/unitframes/units/unit.lua | 1 - 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ls_UI/modules/unitframes/elements/health.lua b/ls_UI/modules/unitframes/elements/health.lua index 988c7e0d..098856f7 100644 --- a/ls_UI/modules/unitframes/elements/health.lua +++ b/ls_UI/modules/unitframes/elements/health.lua @@ -99,6 +99,7 @@ do local element = Mixin(CreateFrame("StatusBar", nil, frame), element_proto) element:SetStatusBarTexture("Interface\\BUTTONS\\WHITE8X8") element:SetFrameLevel(frame:GetFrameLevel() + 1) + element:SetClipsChildren(true) element._texture = element:GetStatusBarTexture() local text = (textParent or element):CreateFontString(nil, "ARTWORK") diff --git a/ls_UI/modules/unitframes/elements/power.lua b/ls_UI/modules/unitframes/elements/power.lua index 70d35d32..321f8988 100644 --- a/ls_UI/modules/unitframes/elements/power.lua +++ b/ls_UI/modules/unitframes/elements/power.lua @@ -130,6 +130,7 @@ do local element = Mixin(CreateFrame("StatusBar", nil, frame), element_proto, power_proto) element:SetStatusBarTexture("Interface\\BUTTONS\\WHITE8X8") element:SetFrameLevel(frame:GetFrameLevel() + 1) + element:SetClipsChildren(true) element:Hide() local text = (textParent or element):CreateFontString(nil, "ARTWORK") @@ -235,6 +236,7 @@ do local element = Mixin(CreateFrame("StatusBar", nil, frame), element_proto, power_proto) element:SetStatusBarTexture("Interface\\BUTTONS\\WHITE8X8") + element:SetClipsChildren(true) element:Hide() local text = (textParent or element):CreateFontString(nil, "ARTWORK") diff --git a/ls_UI/modules/unitframes/units/unit.lua b/ls_UI/modules/unitframes/units/unit.lua index 4deb6628..c4856267 100644 --- a/ls_UI/modules/unitframes/units/unit.lua +++ b/ls_UI/modules/unitframes/units/unit.lua @@ -54,7 +54,6 @@ function UF:CreateSmallUnitFrame(frame) health:SetPoint("RIGHT", frame.Insets.Right, "LEFT", 0, 0) health:SetPoint("TOP", frame.Insets.Top, "BOTTOM", 0, 0) health:SetPoint("BOTTOM", frame.Insets.Bottom, "TOP", 0, 0) - health:SetClipsChildren(true) frame.Health = health frame.HealthPrediction = self:CreateHealthPrediction(frame, health) From cb80cac7eaa6394d6456e6a00c6d08ae7a66a146 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Mon, 28 Nov 2022 19:37:19 +0700 Subject: [PATCH 07/13] Update LDD --- ls_UI/core/mover.lua | 27 ++++++++++++--------------- ls_UI/embeds/LibDropDown | 2 +- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/ls_UI/core/mover.lua b/ls_UI/core/mover.lua index 63ba1f92..9ebe45df 100644 --- a/ls_UI/core/mover.lua +++ b/ls_UI/core/mover.lua @@ -451,23 +451,20 @@ do gridDropdown:SetText(L["MOVER_GRID"]) settings.GridDropdown = gridDropdown - local info = { - isRadio = true, - func = function(_, _, value) - grid:SetSize(value) - grid:Show() - end, - checked = function(self) - return grid:GetSize() == self.args[1] - end, - } - local GRID_SIZES = {4, 8, 16, 32} for i = 1, #GRID_SIZES do - info.text = tostring(GRID_SIZES[i]) - info.args = {GRID_SIZES[i]} - - gridDropdown:Add(info) + gridDropdown:Add({ + isRadio = true, + func = function(_, _, value) + grid:SetSize(value) + grid:Show() + end, + checked = function(self) + return grid:GetSize() == self.args[1] + end, + text = tostring(GRID_SIZES[i]), + args = {GRID_SIZES[i]}, + }) end local usageText = settings:CreateFontString(nil, "OVERLAY") diff --git a/ls_UI/embeds/LibDropDown b/ls_UI/embeds/LibDropDown index b0bba24c..fd396921 160000 --- a/ls_UI/embeds/LibDropDown +++ b/ls_UI/embeds/LibDropDown @@ -1 +1 @@ -Subproject commit b0bba24c841a3e69e4a3f59e416e3d39642b4f3f +Subproject commit fd39692140beda33f4b363e9d1dd50158b07a1ae From c0d727535f162928f5706a7517cfc593b116ab96 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Mon, 28 Nov 2022 21:03:09 +0700 Subject: [PATCH 08/13] Add latest LAB support --- ls_UI/core/button.lua | 14 +++++-- ls_UI/core/defaults.lua | 60 +++++++++++++++++++++++++++-- ls_UI/locales/deDE.lua | 1 + ls_UI/locales/enUS.lua | 2 + ls_UI/locales/esES.lua | 1 + ls_UI/locales/frFR.lua | 1 + ls_UI/locales/ruRU.lua | 1 + ls_UI/locales/zhCN.lua | 1 + ls_UI/modules/bars/actionbars.lua | 64 +++++++++++++++++++++++++++---- ls_UI/modules/bars/core.lua | 4 -- ls_UI_Options/bars/core.lua | 48 +++++++++++++++-------- 11 files changed, 161 insertions(+), 36 deletions(-) diff --git a/ls_UI/core/button.lua b/ls_UI/core/button.lua index 86f50765..5540859a 100644 --- a/ls_UI/core/button.lua +++ b/ls_UI/core/button.lua @@ -72,9 +72,13 @@ local function button_ClearBindings(self) end end -local function setNormalTextureHook(self, texture) - if texture then - self:SetNormalTexture(nil) +local function addMaskTextureHook(self, texture) + self:RemoveMaskTexture(texture) +end + +local function setNormalAtlasTextureHook(self, texture) + if texture and texture ~= 0 then + self:SetNormalTexture(0) end end @@ -185,6 +189,7 @@ local function skinButton(button) local iconMask = button.IconMask if iconMask then icon:RemoveMaskTexture(iconMask) + hooksecurefunc(icon, "AddMaskTexture", addMaskTextureHook) end end @@ -303,7 +308,8 @@ local function skinButton(button) local normalTexture = button.GetNormalTexture and button:GetNormalTexture() if normalTexture then normalTexture:SetTexture(0) - hooksecurefunc(button, "SetNormalTexture", setNormalTextureHook) + hooksecurefunc(button, "SetNormalTexture", setNormalAtlasTextureHook) + hooksecurefunc(button, "SetNormalAtlas", setNormalAtlasTextureHook) border = E:CreateBorder(button) border:SetTexture("Interface\\AddOns\\ls_UI\\assets\\border-thin") diff --git a/ls_UI/core/defaults.lua b/ls_UI/core/defaults.lua index 1a2e44ca..2559cd2e 100644 --- a/ls_UI/core/defaults.lua +++ b/ls_UI/core/defaults.lua @@ -1892,11 +1892,11 @@ D.profile = { point = {"TOPRIGHT", "UIParent", "TOPRIGHT", -4, -4}, }, bars = { - mana_indicator = "button", -- hotkey range_indicator = "button", -- hotkey rightclick_selfcast = false, blizz_vehicle = false, scale = 1, + lock = true, endcaps = "BOTH", -- "LEFT", "RIGHT", "NONE" cooldown = { exp_threshold = 5, @@ -1909,8 +1909,6 @@ D.profile = { }, desaturation = { unusable = true, - mana = true, - range = true, }, bar1 = { -- MainMenuBar flyout_dir = "UP", @@ -1937,14 +1935,20 @@ D.profile = { hotkey = { enabled = true, size = 12, + point = {"TOPRIGHT", 2, 0}, + h_alignment = "RIGHT", }, macro = { enabled = true, size = 12, + point = {"BOTTOM", 0, 0}, + h_alignment = "CENTER", }, count = { enabled = true, size = 12, + point = {"BOTTOMRIGHT", 2, 0}, + h_alignment = "RIGHT", }, cooldown = { text = { @@ -1980,14 +1984,20 @@ D.profile = { hotkey = { enabled = true, size = 12, + point = {"TOPRIGHT", 2, 0}, + h_alignment = "RIGHT", }, macro = { enabled = true, size = 12, + point = {"BOTTOM", 0, 0}, + h_alignment = "CENTER", }, count = { enabled = true, size = 12, + point = {"BOTTOMRIGHT", 2, 0}, + h_alignment = "RIGHT", }, cooldown = { text = { @@ -2023,14 +2033,20 @@ D.profile = { hotkey = { enabled = true, size = 12, + point = {"TOPRIGHT", 2, 0}, + h_alignment = "RIGHT", }, macro = { enabled = true, size = 12, + point = {"BOTTOM", 0, 0}, + h_alignment = "CENTER", }, count = { enabled = true, size = 12, + point = {"BOTTOMRIGHT", 2, 0}, + h_alignment = "RIGHT", }, cooldown = { text = { @@ -2066,14 +2082,20 @@ D.profile = { hotkey = { enabled = true, size = 12, + point = {"TOPRIGHT", 2, 0}, + h_alignment = "RIGHT", }, macro = { enabled = true, size = 12, + point = {"BOTTOM", 0, 0}, + h_alignment = "CENTER", }, count = { enabled = true, size = 12, + point = {"BOTTOMRIGHT", 2, 0}, + h_alignment = "RIGHT", }, cooldown = { text = { @@ -2109,14 +2131,20 @@ D.profile = { hotkey = { enabled = true, size = 12, + point = {"TOPRIGHT", 2, 0}, + h_alignment = "RIGHT", }, macro = { enabled = true, size = 12, + point = {"BOTTOM", 0, 0}, + h_alignment = "CENTER", }, count = { enabled = true, size = 12, + point = {"BOTTOMRIGHT", 2, 0}, + h_alignment = "RIGHT", }, cooldown = { text = { @@ -2152,14 +2180,20 @@ D.profile = { hotkey = { enabled = true, size = 12, + point = {"TOPRIGHT", 2, 0}, + h_alignment = "RIGHT", }, macro = { enabled = true, size = 12, + point = {"BOTTOM", 0, 0}, + h_alignment = "CENTER", }, count = { enabled = true, size = 12, + point = {"BOTTOMRIGHT", 2, 0}, + h_alignment = "RIGHT", }, cooldown = { text = { @@ -2195,14 +2229,20 @@ D.profile = { hotkey = { enabled = true, size = 12, + point = {"TOPRIGHT", 2, 0}, + h_alignment = "RIGHT", }, macro = { enabled = true, size = 12, + point = {"BOTTOM", 0, 0}, + h_alignment = "CENTER", }, count = { enabled = true, size = 12, + point = {"BOTTOMRIGHT", 2, 0}, + h_alignment = "RIGHT", }, cooldown = { text = { @@ -2238,14 +2278,20 @@ D.profile = { hotkey = { enabled = true, size = 12, + point = {"TOPRIGHT", 2, 0}, + h_alignment = "RIGHT", }, macro = { enabled = true, size = 12, + point = {"BOTTOM", 0, 0}, + h_alignment = "CENTER", }, count = { enabled = true, size = 12, + point = {"BOTTOMRIGHT", 2, 0}, + h_alignment = "RIGHT", }, cooldown = { text = { @@ -2281,6 +2327,8 @@ D.profile = { hotkey = { enabled = true, size = 10, + point = {"TOPRIGHT", 2, 0}, + h_alignment = "RIGHT", }, cooldown = { text = { @@ -2314,6 +2362,8 @@ D.profile = { hotkey = { enabled = true, size = 10, + point = {"TOPRIGHT", 2, 0}, + h_alignment = "RIGHT", }, cooldown = { text = { @@ -2346,6 +2396,8 @@ D.profile = { hotkey = { enabled = true, size = 12, + point = {"TOPRIGHT", 2, 0}, + h_alignment = "RIGHT", }, point = {"BOTTOM", "UIParent", "BOTTOM", 0, 20}, }, @@ -2368,6 +2420,8 @@ D.profile = { hotkey = { enabled = true, size = 14, + point = {"TOPRIGHT", 2, 0}, + h_alignment = "RIGHT", }, cooldown = { text = { diff --git a/ls_UI/locales/deDE.lua b/ls_UI/locales/deDE.lua index 6d2e18af..dd89f2c5 100644 --- a/ls_UI/locales/deDE.lua +++ b/ls_UI/locales/deDE.lua @@ -95,6 +95,7 @@ L["LATER"] = "Später" L["LEFT"] = "Links" L["LEFT_DOWN"] = "Links und Runter" L["LEFT_UP"] = "Links und Hoch" +L["LOCK_BUTTONS"] = "Sperre Knöpfe" L["MAINMENU_BUTTON_HOLD_TOOLTIP"] = "|cffffffffUmschalttaste drücken|r, um Speichernutzung anzuzeigen" L["NAME"] = "Name" L["NUMERIC"] = "Numerischer Wert" diff --git a/ls_UI/locales/enUS.lua b/ls_UI/locales/enUS.lua index 27323337..97ff7b68 100644 --- a/ls_UI/locales/enUS.lua +++ b/ls_UI/locales/enUS.lua @@ -71,6 +71,7 @@ L["OFFLINE"] = _G.PLAYER_OFFLINE L["OKAY"] = _G.OKAY L["PAIN"] = _G.PAIN L["PET"] = _G.PET +L["PICKUP_ACTION_KEY"] = _G.PICKUP_ACTION_KEY_TEXT L["RAGE"] = _G.RAGE L["RAID_INFO_COLON"] = _G.RAID_INFO .. ":" L["RELOAD_UI"] = _G.RELOADUI @@ -293,6 +294,7 @@ L["LEFT"] = "Left" L["LEFT_DOWN"] = "Left and Down" L["LEFT_UP"] = "Left and Up" L["LEVEL_TOOLTIP"] = "Level: |cffffffff%d|r" +L["LOCK_BUTTONS"] = "Lock Buttons" L["LOGIN_MSG"] = "Welcome to %s version |cff1a9fc0%s|r. If you're in need of technical support or have suggestions on how to improve the addon you can join our %s |cff5865F2Discord|r server! Links can be found at |cff1a9fc0/lsui|r > %s." L["LOGIN_MSG_TOGGLE"] = "Login Message" L["LOOT_ALL"] = "Loot All" diff --git a/ls_UI/locales/esES.lua b/ls_UI/locales/esES.lua index 32203d30..a6e78959 100644 --- a/ls_UI/locales/esES.lua +++ b/ls_UI/locales/esES.lua @@ -186,6 +186,7 @@ L["LEFT"] = "Izquierda" L["LEFT_DOWN"] = "Izquierda y abajo" L["LEFT_UP"] = "Izquierda y arriba" L["LEVEL_TOOLTIP"] = "Nivel: |cffffffff%d|r" +L["LOCK_BUTTONS"] = "Bloquear botones" L["LOOT_ALL"] = "Despojar todo" L["M_SS_THRESHOLD"] = "M:SS Límite" L["M_SS_THRESHOLD_DESC"] = "El límite (en segundos) bajo el que el tiempo restante se mostrará en formato M:SS. Establecer en 0 para desactivar." diff --git a/ls_UI/locales/frFR.lua b/ls_UI/locales/frFR.lua index 9f79c3fb..b87fa65b 100644 --- a/ls_UI/locales/frFR.lua +++ b/ls_UI/locales/frFR.lua @@ -169,6 +169,7 @@ L["LEFT"] = "Gauche" L["LEFT_DOWN"] = "Gauche vers le bas" L["LEFT_UP"] = "Gauche vers le haut" L["LEVEL_TOOLTIP"] = "Niveau : |cffffffff%d|r" +L["LOCK_BUTTONS"] = "Bloquer les boutons" L["MACRO_TEXT"] = "Texte de macro" L["MAINMENU_BUTTON_DESC"] = "Afficher les performances" L["MAINMENU_BUTTON_HOLD_TOOLTIP"] = "|cffffffffMaintenir Maj|r pour afficher l'utilisation de la mémoire." diff --git a/ls_UI/locales/ruRU.lua b/ls_UI/locales/ruRU.lua index c975b2bd..a038767e 100644 --- a/ls_UI/locales/ruRU.lua +++ b/ls_UI/locales/ruRU.lua @@ -206,6 +206,7 @@ L["LEFT"] = "Влево" L["LEFT_DOWN"] = "Влево и вниз" L["LEFT_UP"] = "Влево и вверх" L["LEVEL_TOOLTIP"] = "Уровень: |cffffffff%d|r" +L["LOCK_BUTTONS"] = "Заблокировать кнопки" L["LOGIN_MSG"] = "Добро пожаловать в %s версии |cff1a9fc0%s|r. Если Вы нуждаетесь в технической поддержке или у Вас есть предложения, как улучшить этот аддон, то Вы можете присоединиться к нашему %s |cff5865F2Discord|r серверу! Ссылки можно найти в |cff1a9fc0/lsui|r > %s." L["LOGIN_MSG_TOGGLE"] = "Сообщение при входе" L["LOOT_ALL"] = "Забрать всю добычу" diff --git a/ls_UI/locales/zhCN.lua b/ls_UI/locales/zhCN.lua index bde15933..96920084 100644 --- a/ls_UI/locales/zhCN.lua +++ b/ls_UI/locales/zhCN.lua @@ -215,6 +215,7 @@ L["LEFT"] = "左" L["LEFT_DOWN"] = "左下" L["LEFT_UP"] = "左上" L["LEVEL_TOOLTIP"] = "等级:|cffffffff%d|r" +L["LOCK_BUTTONS"] = "锁定按钮" L["LOOT_ALL"] = "全部拾取" L["M_SS_THRESHOLD"] = "M:SS 显示阈值" L["M_SS_THRESHOLD_DESC"] = "低于此秒数的时间将会以 4:01 的格式显示,设置成 0 表示禁用此格式" diff --git a/ls_UI/modules/bars/actionbars.lua b/ls_UI/modules/bars/actionbars.lua index 57e4e908..59ad6333 100644 --- a/ls_UI/modules/bars/actionbars.lua +++ b/ls_UI/modules/bars/actionbars.lua @@ -9,7 +9,8 @@ local next = _G.next local unpack = _G.unpack -- Mine -local LibActionButton = LibStub("LibActionButton-1.0-ls") +local LAB = LibStub("LibActionButton-1.0-ls") +local LSM = LibStub("LibSharedMedia-3.0") local isInit = false @@ -162,7 +163,22 @@ function bar_proto:UpdateButtonConfig() }, desaturation = {}, hideElements = { - equipped = false, + border = true, + borderIfEmpty = true, + }, + text = { + count = { + font = {}, + position = {}, + }, + hotkey = { + font = {}, + position = {}, + }, + macro = { + font = {}, + position = {}, + }, }, } end @@ -171,12 +187,25 @@ function bar_proto:UpdateButtonConfig() self.buttonConfig.colors[k][1], self.buttonConfig.colors[k][2], self.buttonConfig.colors[k][3] = v:GetRGB() end + -- this is here just to make LAB happy + for _, text in next, {"count", "hotkey", "macro"} do + self.buttonConfig.text[text].font.font = LSM:Fetch("font", C.db.global.fonts.button.font) + self.buttonConfig.text[text].font.size = self._config[text].size + self.buttonConfig.text[text].font.flags = C.db.global.fonts.button.outline and "OUTLINE" or "" + + self.buttonConfig.text[text].position.anchor = self._config[text].point[1] + self.buttonConfig.text[text].position.relAnchor = self._config[text].point[1] + self.buttonConfig.text[text].position.offsetX = self._config[text].point[2] + self.buttonConfig.text[text].position.offsetY = self._config[text].point[3] + + self.buttonConfig.text[text].justifyH = self._config[text].h_alignment + end + self.buttonConfig.clickOnDown = true self.buttonConfig.desaturation = E:CopyTable(self._config.desaturation, self.buttonConfig.desaturation) self.buttonConfig.flyoutDirection = self._config.flyout_dir self.buttonConfig.hideElements.hotkey = not self._config.hotkey.enabled self.buttonConfig.hideElements.macro = not self._config.macro.enabled - self.buttonConfig.outOfManaColoring = self._config.mana_indicator self.buttonConfig.outOfRangeColoring = self._config.range_indicator self.buttonConfig.showGrid = self._config.grid @@ -184,8 +213,9 @@ function bar_proto:UpdateButtonConfig() self.buttonConfig.keyBoundTarget = button._command button:UpdateConfig(self.buttonConfig) - button:SetAttribute("buttonlock", true) - button:SetAttribute('checkmouseovercast', true) + button:SetAttribute("buttonlock", self._config.lock) + button:SetAttribute("unlockedpreventdrag", true) + button:SetAttribute("checkmouseovercast", true) button:SetAttribute("checkfocuscast", true) button:SetAttribute("checkselfcast", true) button:SetAttribute("*unit2", self._config.rightclick_selfcast and "player" or nil) @@ -200,13 +230,13 @@ function bar1_proto:UpdateConfig() self._config.cooldown = E:CopyTable(C.db.profile.bars.bar1.cooldown, self._config.cooldown) self._config.cooldown = E:CopyTable(C.db.profile.bars.cooldown, self._config.cooldown) self._config.desaturation = E:CopyTable(C.db.profile.bars.desaturation, self._config.desaturation) - self._config.mana_indicator = C.db.profile.bars.mana_indicator + self._config.lock = C.db.profile.bars.lock self._config.range_indicator = C.db.profile.bars.range_indicator self._config.rightclick_selfcast = C.db.profile.bars.rightclick_selfcast if MODULE:IsRestricted() then - self._config.count = E:CopyTable(C.db.profile.bars.bar1.count, self._config.count) self._config.grid = C.db.profile.bars.bar1.grid + self._config.count = E:CopyTable(C.db.profile.bars.bar1.count, self._config.count) self._config.hotkey = E:CopyTable(C.db.profile.bars.bar1.hotkey, self._config.hotkey) self._config.macro = E:CopyTable(C.db.profile.bars.bar1.macro, self._config.macro) end @@ -247,10 +277,11 @@ function MODULE:CreateActionBars() end for i = 1, #data.b_buttons do - local button = Mixin(LibActionButton:CreateButton(i, "$parentButton" .. i, bar), button_proto) + local button = Mixin(LAB:CreateButton(i, "$parentButton" .. i, bar), button_proto) button:SetState(0, "action", i) button._parent = bar button._command = data.type .. i + button.MasqueSkinned = true -- so that LAB doesn't move stuff around bar._buttons[i] = button -- 18 is the last page @@ -297,6 +328,23 @@ function MODULE:CreateActionBars() end end) + local flyout = LAB:GetSpellFlyoutFrame() + if flyout then + E:ForceHide(flyout.Background) + + for _, button in next, LAB.FlyoutButtons do + E:SkinActionButton(button) + button:SetScale(1) + button:SetSize(32, 32) + end + end + + LAB:RegisterCallback("OnFlyoutButtonCreated", function(_, button) + E:SkinActionButton(button) + button:SetScale(1) + button:SetSize(32, 32) + end) + isInit = true end end diff --git a/ls_UI/modules/bars/core.lua b/ls_UI/modules/bars/core.lua index be94835d..e4584f7b 100644 --- a/ls_UI/modules/bars/core.lua +++ b/ls_UI/modules/bars/core.lua @@ -259,10 +259,6 @@ function MODULE:Init() return value ~= "1", "1" end) - E:WatchCVar("lockActionBars", function(value) - return value ~= "1", "1" - end) - isInit = true end end diff --git a/ls_UI_Options/bars/core.lua b/ls_UI_Options/bars/core.lua index 5ccb438e..5af2fa89 100644 --- a/ls_UI_Options/bars/core.lua +++ b/ls_UI_Options/bars/core.lua @@ -265,6 +265,36 @@ function CONFIG:CreateActionBarsOptions(order) name = L["RCLICK_SELFCAST"], disabled = isModuleDisabled, }, + lock = { + order = inc(1), + type = "toggle", + name = L["LOCK_BUTTONS"], + disabled = isModuleDisabled, + set = function(_, value) + C.db.profile.bars.lock = value + + BARS:ForEach("UpdateConfig") + BARS:ForEach("UpdateButtonConfig") + + SetCVar("lockActionBars", value and 1 or 0) + end, + }, + lock_mod = { + order = inc(1), + type = "select", + name = L["PICKUP_ACTION_KEY"], + disabled = function() + return isModuleDisabled() or not C.db.profile.bars.lock + end, + get = function() + return CAST_KEY_INDICES[GetModifiedClick("PICKUPACTION")] + end, + set = function(_, value) + SetModifiedClick("PICKUPACTION", CAST_KEY_VALUES[value]) + SaveBindings(GetCurrentBindingSet() or 1) + end, + values = CAST_KEYS, + }, spacer_2 = { order = inc(1), type = "description", @@ -277,13 +307,6 @@ function CONFIG:CreateActionBarsOptions(order) values = INDICATORS, disabled = isModuleDisabled, }, - mana_indicator = { - order = inc(1), - type = "select", - name = L["OOM_INDICATOR"], - values = INDICATORS, - disabled = isModuleDisabled, - }, spacer_3 = { order = inc(1), type = "description", @@ -301,6 +324,7 @@ function CONFIG:CreateActionBarsOptions(order) set = function(info, value) if C.db.profile.bars.desaturation[info[#info]] ~= value then C.db.profile.bars.desaturation[info[#info]] = value + BARS:ForEach("UpdateConfig") BARS:ForEach("UpdateButtonConfig") end @@ -311,16 +335,6 @@ function CONFIG:CreateActionBarsOptions(order) type = "toggle", name = L["UNUSABLE"], }, - mana = { - order = inc(2), - type = "toggle", - name = L["OOM"], - }, - range = { - order = inc(2), - type = "toggle", - name = L["OOR"], - }, }, }, spacer_4 = { From c7f2c7f6061c83c0521a1c37e1d91388de9f2a63 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Mon, 28 Nov 2022 21:07:53 +0700 Subject: [PATCH 09/13] =?UTF-8?q?=F0=9F=94=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ls_UI/core/modernize.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ls_UI/core/modernize.lua b/ls_UI/core/modernize.lua index 98e9e48e..d28e228b 100644 --- a/ls_UI/core/modernize.lua +++ b/ls_UI/core/modernize.lua @@ -746,6 +746,20 @@ function P:Modernize(data, name, key) data.version = 10000001 end + + --> 100002.01 + if data.version < 10000201 then + if data.bars then + data.bars.mana_indicator = nil + + if data.bars.desaturation then + data.bars.desaturation.mana = nil + data.bars.desaturation.range = nil + end + end + + data.version = 10000201 + end elseif key == "private" then --> 90001.05 if data.version < 9000105 then From 3148dcddd89c822470194aef01b9c7f2f279249b Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Mon, 28 Nov 2022 21:24:37 +0700 Subject: [PATCH 10/13] Update embeds --- ls_UI/core/mover.lua | 2 +- .../AceConfigDialog-3.0/AceConfigDialog-3.0.lua | 11 ++++++++++- .../AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua | 3 ++- ls_UI/embeds/LibDropDown | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ls_UI/core/mover.lua b/ls_UI/core/mover.lua index 9ebe45df..7a2043f9 100644 --- a/ls_UI/core/mover.lua +++ b/ls_UI/core/mover.lua @@ -444,7 +444,7 @@ do nameToggle.Text = _G[nameToggle:GetName() .. "Text"] - local gridDropdown = LibStub("LibDropDown"):NewButtonStretch(settings, "$parentGridDropdown") + local gridDropdown = LibStub("LibDropDown-ls"):NewButtonStretch(settings, "$parentGridDropdown") gridDropdown:SetPoint("TOPRIGHT", -3, -3) gridDropdown:SetSize(120, 20) gridDropdown:SetFrameLevel(3) diff --git a/ls_UI/embeds/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua b/ls_UI/embeds/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua index 7bde6c1c..4446f4c8 100644 --- a/ls_UI/embeds/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua +++ b/ls_UI/embeds/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua @@ -7,7 +7,7 @@ local LibStub = LibStub local gui = LibStub("AceGUI-3.0") local reg = LibStub("AceConfigRegistry-3.0") -local MAJOR, MINOR = "AceConfigDialog-3.0", 85 +local MAJOR, MINOR = "AceConfigDialog-3.0", 86 local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR) if not AceConfigDialog then return end @@ -147,6 +147,7 @@ local stringIsLiteral = { width = true, image = true, fontSize = true, + tooltipHyperlink = true } --Is Never a function or method @@ -501,6 +502,14 @@ local function OptionOnMouseOver(widget, event) local tooltip = AceConfigDialog.tooltip tooltip:SetOwner(widget.frame, "ANCHOR_TOPRIGHT") + + local tooltipHyperlink = GetOptionsMemberValue("tooltipHyperlink", opt, options, path, appName) + if tooltipHyperlink then + tooltip:SetHyperlink(tooltipHyperlink) + tooltip:Show() + return + end + local name = GetOptionsMemberValue("name", opt, options, path, appName) local desc = GetOptionsMemberValue("desc", opt, options, path, appName) local usage = GetOptionsMemberValue("usage", opt, options, path, appName) diff --git a/ls_UI/embeds/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua b/ls_UI/embeds/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua index 8aea52e7..7d0d1087 100644 --- a/ls_UI/embeds/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua +++ b/ls_UI/embeds/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua @@ -11,7 +11,7 @@ -- @release $Id$ local CallbackHandler = LibStub("CallbackHandler-1.0") -local MAJOR, MINOR = "AceConfigRegistry-3.0", 20 +local MAJOR, MINOR = "AceConfigRegistry-3.0", 21 local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR) if not AceConfigRegistry then return end @@ -83,6 +83,7 @@ local basekeys={ dialogHidden=optmethodbool, dropdownHidden=optmethodbool, cmdHidden=optmethodbool, + tooltipHyperlink=optstringfunc, icon=optstringnumberfunc, iconCoords=optmethodtable, handler=opttable, diff --git a/ls_UI/embeds/LibDropDown b/ls_UI/embeds/LibDropDown index fd396921..a3b1a5ec 160000 --- a/ls_UI/embeds/LibDropDown +++ b/ls_UI/embeds/LibDropDown @@ -1 +1 @@ -Subproject commit fd39692140beda33f4b363e9d1dd50158b07a1ae +Subproject commit a3b1a5ec28bb73328b6d7c91fec1bc1d0d238389 From 93d0ad6f743dc2383df967c4ba83858d010ab266 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Mon, 28 Nov 2022 21:26:57 +0700 Subject: [PATCH 11/13] To avoid confusion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's just for tossing zips around 😵 --- .packager.ps1 => .compressor.ps1 | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .packager.ps1 => .compressor.ps1 (100%) diff --git a/.packager.ps1 b/.compressor.ps1 similarity index 100% rename from .packager.ps1 rename to .compressor.ps1 From 0951136741569966cac40c5ea1ae1dfcf60ac412 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Mon, 28 Nov 2022 21:42:14 +0700 Subject: [PATCH 12/13] =?UTF-8?q?=F0=9F=93=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 20 ++++++++++++++++++++ ls_UI/core/changelog.lua | 26 +++++++++----------------- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7432627c..18572ef2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ # CHANGELOG +## Version 100002.01 + +- Added 10.0.2 support. +- Updated embeds. + +### Action Bars + +- The latest LAB includes custom flyouts (a bit buggy). +- Reverted the hack added in 100000.01 that locked action bars, it's no longer necessary. + +### Unit Frames + +- Fixed an issue where heal and power cost predictions would sometimes be displayed outside the + bounds of the unit frame. + +### Known Issues + +- Empowered spell casts have very basic support atm. I'm planning to rework castbars and other + progress bars later, so I chose not to do the same work twice. Soz. + ## Version 100000.03 ### Action Bars diff --git a/ls_UI/core/changelog.lua b/ls_UI/core/changelog.lua index 3c9e4861..45efe29e 100644 --- a/ls_UI/core/changelog.lua +++ b/ls_UI/core/changelog.lua @@ -6,29 +6,21 @@ local _G = getfenv(0) -- Mine E.CHANGELOG = [[ -### Action Bars - -- Fixed a bug where the extra action button would stay hidden despite being enabled. -- Fixed a bug where an action bar anchored to another frame would appear in a different spot from - its mover. I had to rework movers for DF, so there might be more of these, please, continue to - report them. +- Added 10.0.2 support. +- Updated embeds. -### Minimap +### Action Bars -- Added custom difficulty flags. LFR, normal, heroic, mythic, and M+ difficulties will now have - unique flags. There's also an option to show the tooltip with the difficulty info, it's disabled - by default. +- The latest LAB includes custom flyouts (a bit buggy). +- Reverted the hack added in 100000.01 that locked action bars, it's no longer necessary. ### Unit Frames -- Added an option to use Blizzard castbar. When you disable the player castbar, the new "Enable - Blizzard Castbar" option will appear next to it. +- Fixed an issue where heal and power cost predictions would sometimes be displayed outside the + bounds of the unit frame. ### Known Issues -- Spell flyouts don't work. It's not a bug in my UI, it's a Blizz bug that affects all addons. - I feel your pain, I have a mage alt, but for the time being either place frequently used spells - on your action bars or use them directly from your spellbook. -- Tooltips don't work. Just to reiterate, Blizz chose to delay the new tooltip system until 10.0.2, - the rewritten tooltip module relies on it to work, so I had to disable it for the time being. +- Empowered spell casts have very basic support atm. I'm planning to rework castbars and other + progress bars later, so I chose not to do the same work twice. Soz. ]] From c6d8e33dcfba375e8038afd8ff106301d5801201 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Mon, 28 Nov 2022 21:42:21 +0700 Subject: [PATCH 13/13] .toc bump --- ls_UI/ls_UI.toc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ls_UI/ls_UI.toc b/ls_UI/ls_UI.toc index 90ec654e..10bd0e79 100644 --- a/ls_UI/ls_UI.toc +++ b/ls_UI/ls_UI.toc @@ -1,6 +1,6 @@ -## Interface: 100000 +## Interface: 100002 ## Author: lightspark -## Version: 100000.03 +## Version: 100002.01 ## Title: LS: |cff1a9fc0UI|r ## Notes: Yet another UI, but this one is a bit special... ## SavedVariables: LS_UI_GLOBAL_CONFIG, LS_UI_PRIVATE_CONFIG