From 99f91db30c21c4f288fea87bb03c14575da339b7 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Sat, 28 Nov 2020 17:14:20 +0700 Subject: [PATCH 01/35] .toc bump --- ls_UI.toc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ls_UI.toc b/ls_UI.toc index d699086b..f99a5457 100644 --- a/ls_UI.toc +++ b/ls_UI.toc @@ -1,6 +1,6 @@ ## Interface: 90002 ## Author: lightspark -## Version: 90002.03 +## Version: 90002.04 ## Title: LS: |cff1a9fc0UI|r ## Notes: Yet another UI, but this one is a bit special... ## SavedVariablesPerCharacter: LS_UI_CHAR_CONFIG From 500af64be8e01ebfc98e36e4331007d7b3cfbdd3 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Mon, 30 Nov 2020 22:17:00 +0700 Subject: [PATCH 02/35] Don't update elements on disabled unit frames Ref: #58 --- modules/unitframes/core.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/unitframes/core.lua b/modules/unitframes/core.lua index ca52552a..078cfa86 100644 --- a/modules/unitframes/core.lua +++ b/modules/unitframes/core.lua @@ -216,8 +216,13 @@ function UF:CreateUnitFrame(unit, name) end end +local allowedMethodsIfDisabled = { + Update = true, + UpdateConfig = true, +} + function UF:UpdateUnitFrame(unit, method, ...) - if units[unit] then + if units[unit] and (C.db.profile.units[unit].enabled or allowedMethodsIfDisabled[method]) then if unit == "boss"then for i = 1, 5 do if objects[unit .. i][method] then From b875b19d452f1a5c3f7ca01fff4995fe3095a968 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Mon, 30 Nov 2020 22:17:18 +0700 Subject: [PATCH 03/35] =?UTF-8?q?=F0=9F=92=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/unitframes.lua | 13 +++++-------- core/defaults.lua | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/config/unitframes.lua b/config/unitframes.lua index fc1fd93c..e96652b3 100644 --- a/config/unitframes.lua +++ b/config/unitframes.lua @@ -240,6 +240,11 @@ local function getUFOption_Health(order, unit) type = "toggle", name = L["CLASS"], }, + reaction = { + order = 2, + type = "toggle", + name = L["REACTION"], + }, }, }, spacer_2 = { @@ -625,14 +630,6 @@ local function getUFOption_Health(order, unit) }, } - if unit ~= "player" and unit ~= "pet" then - temp.args.color.args.reaction = { - order = 2, - type = "toggle", - name = L["REACTION"], - } - end - return temp end diff --git a/core/defaults.lua b/core/defaults.lua index 3e3eb0fa..eeaf4b4f 100644 --- a/core/defaults.lua +++ b/core/defaults.lua @@ -422,7 +422,7 @@ D.profile = { orientation = "VERTICAL", color = { class = false, - reaction = true, + reaction = false, }, text = { tag = "[ls:health:cur]", From afe0ee8d8116af6a5a994aa2adb869c35f9185f7 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Sun, 13 Dec 2020 13:21:43 +0700 Subject: [PATCH 04/35] Add ilvl text to equipped items --- modules/blizzard/characterframe.lua | 46 +++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/modules/blizzard/characterframe.lua b/modules/blizzard/characterframe.lua index 4cd97fca..8fe31deb 100644 --- a/modules/blizzard/characterframe.lua +++ b/modules/blizzard/characterframe.lua @@ -5,6 +5,7 @@ local MODULE = P:GetModule("Blizzard") -- Lua local _G = getfenv(0) local hooksecurefunc = _G.hooksecurefunc +local m_floor = _G.math.floor local next = _G.next local s_trim = _G.string.trim local s_upper = _G.string.upper @@ -45,20 +46,36 @@ local EQUIP_SLOTS = { [17] = "CharacterSecondaryHandSlot", } +local ILVL_COLORS = {} +local ILVL_STEP = 13 -- the ilvl step between content difficulties + +local avgItemLevel = m_floor(GetAverageItemLevel()) + +local function getItemLevelColor(itemLevel) + if itemLevel == "" then + itemLevel = 0 + end + + -- if an item is worse than the average ilvl by one full step, it's really bad + return E:GetGradientAsRGB((itemLevel - avgItemLevel + ILVL_STEP) / ILVL_STEP, ILVL_COLORS) +end + local function scanSlot(slotID) local link = GetInventoryItemLink("player", slotID) if link then - return true, E:GetItemEnchantGemInfo(link) + return true, GetDetailedItemLevelInfo(link), E:GetItemEnchantGemInfo(link) elseif GetInventoryItemTexture("player", slotID) then - return false, "", "", "", "" + return false, "", "", "", "", "" end - return true, "", "", "", "" + return true, "", "", "", "", "" end local function updateSlot(slotID) - local isOk, enchant, gem1, gem2, gem3 = scanSlot(slotID) + local isOk, iLvl, enchant, gem1, gem2, gem3 = scanSlot(slotID) if isOk then + _G[EQUIP_SLOTS[slotID]].ItemLevelText:SetText(iLvl) + _G[EQUIP_SLOTS[slotID]].ItemLevelText:SetTextColor(getItemLevelColor(iLvl)) _G[EQUIP_SLOTS[slotID]].EnchantText:SetText(enchant) _G[EQUIP_SLOTS[slotID]].GemText:SetText(s_trim(gem1 .. gem2 .. gem3)) else @@ -67,10 +84,12 @@ local function updateSlot(slotID) end local function updateAllSlots() - local scanComplete, isOk, enchant, gem1, gem2, gem3 = true + local scanComplete, isOk, iLvl, enchant, gem1, gem2, gem3 = true for slotID, slotName in next, EQUIP_SLOTS do - isOk, enchant, gem1, gem2, gem3 = scanSlot(slotID) + isOk, iLvl, enchant, gem1, gem2, gem3 = scanSlot(slotID) + _G[slotName].ItemLevelText:SetText(iLvl) + _G[slotName].ItemLevelText:SetTextColor(getItemLevelColor(iLvl)) _G[slotName].EnchantText:SetText(enchant) _G[slotName].GemText:SetText(s_trim(gem1 .. gem2 .. gem3)) @@ -142,6 +161,10 @@ function MODULE:SetUpCharacterFrame() HideUIPanel(CharacterFrame) end + ILVL_COLORS[1] = C.db.global.colors.red + ILVL_COLORS[2] = C.db.global.colors.yellow + ILVL_COLORS[3] = C.db.global.colors.white + for slot, textOnRight in next, INV_SLOTS do for _, v in next, {slot:GetRegions()} do if v:IsObjectType("Texture") and SLOT_TEXTURES_TO_REMOVE[s_upper(v:GetTexture() or "")] then @@ -165,6 +188,13 @@ function MODULE:SetUpCharacterFrame() gemText:SetJustifyH(textOnRight and "LEFT" or "RIGHT") slot.GemText = gemText + local iLvlText = slot:CreateFontString(nil, "ARTWORK", "LSFont12_Outline") + iLvlText:SetPoint("TOPLEFT", -2, -1) + iLvlText:SetPoint("BOTTOMRIGHT", 2, 1) + iLvlText:SetJustifyH("RIGHT") + iLvlText:SetJustifyV("BOTTOM") + slot.ItemLevelText = iLvlText + if textOnRight then enchText:SetPoint("TOPLEFT", slot, "TOPRIGHT", 4, 0) gemText:SetPoint("BOTTOMLEFT", slot, "BOTTOMRIGHT", 7, 0) @@ -244,6 +274,10 @@ function MODULE:SetUpCharacterFrame() end end) + E:RegisterEvent("PLAYER_AVG_ITEM_LEVEL_UPDATE", function() + avgItemLevel = m_floor(GetAverageItemLevel()) + end) + isInit = true end end From a4ae4f8914ded40069761dd34fb10091dbba0098 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Mon, 14 Dec 2020 17:17:40 +0700 Subject: [PATCH 05/35] Make sure that avg ilvl is known --- modules/blizzard/characterframe.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/blizzard/characterframe.lua b/modules/blizzard/characterframe.lua index 8fe31deb..a170c0d8 100644 --- a/modules/blizzard/characterframe.lua +++ b/modules/blizzard/characterframe.lua @@ -49,7 +49,7 @@ local EQUIP_SLOTS = { local ILVL_COLORS = {} local ILVL_STEP = 13 -- the ilvl step between content difficulties -local avgItemLevel = m_floor(GetAverageItemLevel()) +local avgItemLevel local function getItemLevelColor(itemLevel) if itemLevel == "" then @@ -161,6 +161,8 @@ function MODULE:SetUpCharacterFrame() HideUIPanel(CharacterFrame) end + avgItemLevel = m_floor(GetAverageItemLevel()) + ILVL_COLORS[1] = C.db.global.colors.red ILVL_COLORS[2] = C.db.global.colors.yellow ILVL_COLORS[3] = C.db.global.colors.white From 4daa0cd8cd6711d4f57e826667db167e6665b242 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Sat, 2 Jan 2021 21:09:12 +0700 Subject: [PATCH 06/35] Use hooksecurefunc instead of HookScript --- modules/unitframes/units/player.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/unitframes/units/player.lua b/modules/unitframes/units/player.lua index 039daebf..eac01a41 100644 --- a/modules/unitframes/units/player.lua +++ b/modules/unitframes/units/player.lua @@ -458,10 +458,10 @@ do addPower:SetFrameLevel(level + 1) frame.AdditionalPower = addPower - addPower:HookScript("OnHide", function(self) + hooksecurefunc(addPower, "Hide", function(self) frame.Insets.Top:Refresh(self, false, 0) end) - addPower:HookScript("OnShow", function(self) + hooksecurefunc(addPower, "Show", function(self) frame.Insets.Top:Refresh(self, true, 1) end) @@ -476,10 +476,10 @@ do stagger:SetFrameLevel(level + 1) frame.Stagger = stagger - stagger:HookScript("OnHide", function(self) + hooksecurefunc(stagger, "Hide", function(self) frame.Insets.Top:Refresh(self, false, 0) end) - stagger:HookScript("OnShow", function(self) + hooksecurefunc(stagger, "Show", function(self) frame.Insets.Top:Refresh(self, true, 1) end) @@ -489,10 +489,10 @@ do runes:SetFrameLevel(level + 1) frame.Runes = runes - runes:HookScript("OnHide", function(self) + hooksecurefunc(runes, "Hide", function(self) frame.Insets.Top:Refresh(self, false, 0) end) - runes:HookScript("OnShow", function(self) + hooksecurefunc(runes, "Show", function(self) frame.Insets.Top:Refresh(self, true, 6) end) @@ -503,10 +503,10 @@ do classPower:SetFrameLevel(level + 1) frame.ClassPower = classPower - classPower:HookScript("OnHide", function(self) + hooksecurefunc(classPower, "Hide", function(self) frame.Insets.Top:Refresh(self, false, 0) end) - classPower:HookScript("OnShow", function(self) + hooksecurefunc(classPower, "Show", function(self) frame.Insets.Top:Refresh(self, true, self.__max) end) From f11c1156560f115084278a00d5a9556a3f060ef6 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Sun, 3 Jan 2021 16:30:01 +0700 Subject: [PATCH 07/35] Add LSM support for buffs and debuffs I have a feeling that I'll have to reorganise the fonts section --- config/auras.lua | 16 ++-------------- config/general.lua | 38 +++++++++++++++++++++++++++++++++++++- core/defaults.lua | 7 +++++-- modules/auras/auras.lua | 5 +++-- 4 files changed, 47 insertions(+), 19 deletions(-) diff --git a/config/auras.lua b/config/auras.lua index 66a07e27..9f86e74a 100644 --- a/config/auras.lua +++ b/config/auras.lua @@ -217,13 +217,7 @@ local function getOptionsTable_Aura(order, name, filter) order = 1, type = "range", name = L["SIZE"], - min = 10, max = 20, step = 2, - }, - flag = { - order = 2, - type = "select", - name = L["FLAG"], - values = FLAGS, + min = 8, max = 48, step = 1, }, h_alignment = { order = 3, @@ -269,13 +263,7 @@ local function getOptionsTable_Aura(order, name, filter) order = 2, type = "range", name = L["SIZE"], - min = 10, max = 20, step = 2, - }, - flag = { - order = 3, - type = "select", - name = L["FLAG"], - values = FLAGS, + min = 8, max = 48, step = 1, }, v_alignment = { order = 4, diff --git a/config/general.lua b/config/general.lua index 1d0c67bd..e11b5104 100644 --- a/config/general.lua +++ b/config/general.lua @@ -1,5 +1,6 @@ local _, ns = ... local E, C, M, L, P, D, oUF = ns.E, ns.C, ns.M, ns.L, ns.P, ns.D, ns.oUF +local AURAS = P:GetModule("Auras") local BARS = P:GetModule("Bars") local BLIZZARD = P:GetModule("Blizzard") local CONFIG = P:GetModule("Config") @@ -1875,9 +1876,44 @@ function CONFIG:CreateGeneralPanel(order) }, }, }, - units = { + auras = { order = 3, type = "group", + name = L["BUFFS_AND_DEBUFFS"], + set = function(info, value) + C.db.global.fonts.auras[info[#info]] = value + + AURAS:ForEachHeader("UpdateConfig") + AURAS:ForEachHeader("ForEachButton", "UpdateCountText") + end, + args = { + font = { + order = 1, + type = "select", + name = L["NAME"], + dialogControl = "LSM30_Font", + values = LibStub("LibSharedMedia-3.0"):HashTable("font"), + get = function() + return LibStub("LibSharedMedia-3.0"):IsValid("font", C.db.global.fonts.auras.font) + and C.db.global.fonts.auras.font + or LibStub("LibSharedMedia-3.0"):GetDefault("font") + end, + }, + outline = { + order = 2, + type = "toggle", + name = L["OUTLINE"], + }, + shadow = { + order = 3, + type = "toggle", + name = L["SHADOW"], + }, + }, + }, + units = { + order = 4, + type = "group", name = L["UNITS"], set = function(info, value) C.db.global.fonts.units[info[#info]] = value diff --git a/core/defaults.lua b/core/defaults.lua index eeaf4b4f..74f8fa5b 100644 --- a/core/defaults.lua +++ b/core/defaults.lua @@ -206,6 +206,11 @@ D.global = { outline = true, shadow = false, }, + auras = { + font = defaultFont, + outline = true, + shadow = false, + } }, tags = { ["ls:absorb:damage"] = { @@ -895,8 +900,6 @@ D.profile = { disable_mouse = false, count = { size = 10, - outline = true, - shadow = false, h_alignment = "RIGHT", v_alignment = "TOP", }, diff --git a/modules/auras/auras.lua b/modules/auras/auras.lua index 7e374e27..565fecf6 100644 --- a/modules/auras/auras.lua +++ b/modules/auras/auras.lua @@ -146,12 +146,12 @@ end local function button_UpdateCountText(self) local config = self._parent._config.count - self.Count:SetFontObject("LSFont" .. config.size .. config.flag) + self.Count:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", config.font), config.size, config.outline and "OUTLINE" or nil) self.Count:SetJustifyH(config.h_alignment) self.Count:SetJustifyV(config.v_alignment) self.Count:SetWordWrap(false) - if config.flag == "_Shadow" then + if config.shadow then self.Count:SetShadowOffset(1, -1) else self.Count:SetShadowOffset(0, 0) @@ -291,6 +291,7 @@ end local function header_UpdateConfig(self) self._config = E:CopyTable(C.db.profile.auras[self._filter], self._config) self._config.cooldown = E:CopyTable(C.db.profile.auras.cooldown, self._config.cooldown) + self._config.count = E:CopyTable(C.db.global.fonts.auras, self._config.count) end local function header_UpdateCooldownConfig(self) From 0532106d4c4b8a1ae48163c997bad9094d7160c9 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Sun, 3 Jan 2021 16:50:22 +0700 Subject: [PATCH 08/35] =?UTF-8?q?=F0=9F=92=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/general.lua | 4 ++-- modules/auras/auras.lua | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/config/general.lua b/config/general.lua index e11b5104..fc5d7c71 100644 --- a/config/general.lua +++ b/config/general.lua @@ -1883,8 +1883,8 @@ function CONFIG:CreateGeneralPanel(order) set = function(info, value) C.db.global.fonts.auras[info[#info]] = value - AURAS:ForEachHeader("UpdateConfig") - AURAS:ForEachHeader("ForEachButton", "UpdateCountText") + AURAS:ForEach("UpdateConfig") + AURAS:ForEach("ForEach", "UpdateCountText") end, args = { font = { diff --git a/modules/auras/auras.lua b/modules/auras/auras.lua index 565fecf6..51af5e32 100644 --- a/modules/auras/auras.lua +++ b/modules/auras/auras.lua @@ -244,10 +244,10 @@ local function header_Update(self) end self:Hide() - self:ForEachButton("Hide") - self:ForEachButton("UpdateAuraTypeIcon") - self:ForEachButton("UpdateCountText") - self:ForEachButton("SetSize", config.size, config.size) + self:ForEach("Hide") + self:ForEach("UpdateAuraTypeIcon") + self:ForEach("UpdateCountText") + self:ForEach("SetSize", config.size, config.size) self:UpdateCooldownConfig() self:SetAttribute("filter", self._filter) self:SetAttribute("initialConfigFunction", ([[ @@ -279,7 +279,7 @@ local function header_Update(self) end end -local function header_ForEachButton(self, method, ...) +local function header_ForEach(self, method, ...) local buttons = self._buttons or {self:GetChildren()} for _, button in next, buttons do if button[method] then @@ -379,7 +379,7 @@ local function createHeader(filter) end header._filter = filter - header.ForEachButton = header_ForEachButton + header.ForEach = header_ForEach header.Update = header_Update header.UpdateConfig = header_UpdateConfig header.UpdateCooldownConfig = header_UpdateCooldownConfig @@ -406,15 +406,15 @@ function MODULE.Init() isInit = true - MODULE:ForEachHeader("Update") + MODULE:ForEach("Update") end end function MODULE:Update() - self:ForEachHeader("Update") + self:ForEach("Update") end -function MODULE:ForEachHeader(method, ...) +function MODULE:ForEach(method, ...) for _, header in next, headers do if header[method] then header[method](header, ...) From 393f61235b4ac29838b501a14c6e3a760025b34a Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Sun, 3 Jan 2021 16:52:30 +0700 Subject: [PATCH 09/35] Merge auras and bars fonts into one category They all are buttons anyway --- config/general.lua | 44 +++++-------------------------------- core/defaults.lua | 7 +----- locales/enUS.lua | 2 ++ modules/auras/auras.lua | 2 +- modules/bars/actionbars.lua | 6 ++--- modules/bars/core.lua | 6 ++--- modules/bars/petbattle.lua | 2 +- modules/bars/xpbar.lua | 3 ++- 8 files changed, 19 insertions(+), 53 deletions(-) diff --git a/config/general.lua b/config/general.lua index fc5d7c71..90f58ec2 100644 --- a/config/general.lua +++ b/config/general.lua @@ -1828,12 +1828,12 @@ function CONFIG:CreateGeneralPanel(order) }, }, }, - bars = { + buttons = { order = 2, type = "group", - name = L["ACTION_BARS"], + name = L["BUTTONS"], set = function(info, value) - C.db.global.fonts.bars[info[#info]] = value + C.db.global.fonts.button[info[#info]] = value BARS:ForBar("bar1", "UpdateConfig") BARS:ForBar("bar2", "UpdateConfig") @@ -1850,38 +1850,6 @@ function CONFIG:CreateGeneralPanel(order) BARS:ForEach("ForEach", "UpdateHotKeyFont") BARS:ForEach("ForEach", "UpdateMacroFont") BARS:ForBar("xpbar", "UpdateFont") - end, - args = { - font = { - order = 1, - type = "select", - name = L["NAME"], - dialogControl = "LSM30_Font", - values = LibStub("LibSharedMedia-3.0"):HashTable("font"), - get = function() - return LibStub("LibSharedMedia-3.0"):IsValid("font", C.db.global.fonts.bars.font) - and C.db.global.fonts.bars.font - or LibStub("LibSharedMedia-3.0"):GetDefault("font") - end, - }, - outline = { - order = 2, - type = "toggle", - name = L["OUTLINE"], - }, - shadow = { - order = 3, - type = "toggle", - name = L["SHADOW"], - }, - }, - }, - auras = { - order = 3, - type = "group", - name = L["BUFFS_AND_DEBUFFS"], - set = function(info, value) - C.db.global.fonts.auras[info[#info]] = value AURAS:ForEach("UpdateConfig") AURAS:ForEach("ForEach", "UpdateCountText") @@ -1894,8 +1862,8 @@ function CONFIG:CreateGeneralPanel(order) dialogControl = "LSM30_Font", values = LibStub("LibSharedMedia-3.0"):HashTable("font"), get = function() - return LibStub("LibSharedMedia-3.0"):IsValid("font", C.db.global.fonts.auras.font) - and C.db.global.fonts.auras.font + return LibStub("LibSharedMedia-3.0"):IsValid("font", C.db.global.fonts.button.font) + and C.db.global.fonts.button.font or LibStub("LibSharedMedia-3.0"):GetDefault("font") end, }, @@ -1912,7 +1880,7 @@ function CONFIG:CreateGeneralPanel(order) }, }, units = { - order = 4, + order = 3, type = "group", name = L["UNITS"], set = function(info, value) diff --git a/core/defaults.lua b/core/defaults.lua index 74f8fa5b..d0270a2b 100644 --- a/core/defaults.lua +++ b/core/defaults.lua @@ -201,16 +201,11 @@ D.global = { outline = false, shadow = true, }, - bars = { + buttons = { font = defaultFont, outline = true, shadow = false, }, - auras = { - font = defaultFont, - outline = true, - shadow = false, - } }, tags = { ["ls:absorb:damage"] = { diff --git a/locales/enUS.lua b/locales/enUS.lua index c18ebc49..c20a53b0 100644 --- a/locales/enUS.lua +++ b/locales/enUS.lua @@ -495,3 +495,5 @@ L["YOUR_HEALING"] = "Your Healing" L["YOURS_FIRST"] = "Yours First" L["ZONE_ABILITY_BUTTON"] = "Zone Ability Button" L["ZONE_TEXT"] = "Zone Text" + +L["BUTTONS"] = "Buttons" diff --git a/modules/auras/auras.lua b/modules/auras/auras.lua index 51af5e32..6c2c3a2e 100644 --- a/modules/auras/auras.lua +++ b/modules/auras/auras.lua @@ -291,7 +291,7 @@ end local function header_UpdateConfig(self) self._config = E:CopyTable(C.db.profile.auras[self._filter], self._config) self._config.cooldown = E:CopyTable(C.db.profile.auras.cooldown, self._config.cooldown) - self._config.count = E:CopyTable(C.db.global.fonts.auras, self._config.count) + self._config.count = E:CopyTable(C.db.global.fonts.buttons, self._config.count) end local function header_UpdateCooldownConfig(self) diff --git a/modules/bars/actionbars.lua b/modules/bars/actionbars.lua index eb79e8fa..b714afd4 100644 --- a/modules/bars/actionbars.lua +++ b/modules/bars/actionbars.lua @@ -148,9 +148,9 @@ local function bar_UpdateConfig(self) self._config.macro = E:CopyTable(C.db.profile.bars.bar1.macro, self._config.macro) end - self._config.count = E:CopyTable(C.db.global.fonts.bars, self._config.count) - self._config.hotkey = E:CopyTable(C.db.global.fonts.bars, self._config.hotkey) - self._config.macro = E:CopyTable(C.db.global.fonts.bars, self._config.macro) + self._config.count = E:CopyTable(C.db.global.fonts.buttons, self._config.count) + self._config.hotkey = E:CopyTable(C.db.global.fonts.buttons, self._config.hotkey) + self._config.macro = E:CopyTable(C.db.global.fonts.buttons, self._config.macro) end local function bar_UpdateButtonConfig(self) diff --git a/modules/bars/core.lua b/modules/bars/core.lua index 87247207..5b4e17fb 100644 --- a/modules/bars/core.lua +++ b/modules/bars/core.lua @@ -80,15 +80,15 @@ local function bar_UpdateConfig(self) end if C.db.profile.bars[self._id].count then - self._config.count = E:CopyTable(C.db.global.fonts.bars, self._config.count) + self._config.count = E:CopyTable(C.db.global.fonts.buttons, self._config.count) end if C.db.profile.bars[self._id].hotkey then - self._config.hotkey = E:CopyTable(C.db.global.fonts.bars, self._config.hotkey) + self._config.hotkey = E:CopyTable(C.db.global.fonts.buttons, self._config.hotkey) end if C.db.profile.bars[self._id].macro then - self._config.macro = E:CopyTable(C.db.global.fonts.bars, self._config.macro) + self._config.macro = E:CopyTable(C.db.global.fonts.buttons, self._config.macro) end end diff --git a/modules/bars/petbattle.lua b/modules/bars/petbattle.lua index 4d75d646..5b7dff2a 100644 --- a/modules/bars/petbattle.lua +++ b/modules/bars/petbattle.lua @@ -54,7 +54,7 @@ local function bar_UpdateConfig(self) self._config.hotkey = E:CopyTable(C.db.profile.bars.pet_battle.hotkey, self._config.hotkey) end - self._config.hotkey = E:CopyTable(C.db.global.fonts.bars, self._config.hotkey) + self._config.hotkey = E:CopyTable(C.db.global.fonts.buttons, self._config.hotkey) end local function button_UpdateHotKey(self, state) diff --git a/modules/bars/xpbar.lua b/modules/bars/xpbar.lua index 78351422..4abd8c66 100644 --- a/modules/bars/xpbar.lua +++ b/modules/bars/xpbar.lua @@ -84,7 +84,8 @@ local function bar_UpdateConfig(self) self._config.text = E:CopyTable(C.db.profile.bars.xpbar.text, self._config.text) end - self._config.text = E:CopyTable(C.db.global.fonts.bars, self._config.text) + -- FIX ME! Should be controlled by a different font type which is NYI + self._config.text = E:CopyTable(C.db.global.fonts.buttons, self._config.text) end local function updateFont(fontString, config) From 494ba846bda31f3bd6fa82b44b57ecdff867e1d0 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Sun, 3 Jan 2021 16:53:55 +0700 Subject: [PATCH 10/35] =?UTF-8?q?=F0=9F=A4=A6=E2=80=8D=E2=99=80=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/general.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/general.lua b/config/general.lua index 90f58ec2..ad52155f 100644 --- a/config/general.lua +++ b/config/general.lua @@ -1833,7 +1833,7 @@ function CONFIG:CreateGeneralPanel(order) type = "group", name = L["BUTTONS"], set = function(info, value) - C.db.global.fonts.button[info[#info]] = value + C.db.global.fonts.buttons[info[#info]] = value BARS:ForBar("bar1", "UpdateConfig") BARS:ForBar("bar2", "UpdateConfig") @@ -1862,8 +1862,8 @@ function CONFIG:CreateGeneralPanel(order) dialogControl = "LSM30_Font", values = LibStub("LibSharedMedia-3.0"):HashTable("font"), get = function() - return LibStub("LibSharedMedia-3.0"):IsValid("font", C.db.global.fonts.button.font) - and C.db.global.fonts.button.font + return LibStub("LibSharedMedia-3.0"):IsValid("font", C.db.global.fonts.buttons.font) + and C.db.global.fonts.buttons.font or LibStub("LibSharedMedia-3.0"):GetDefault("font") end, }, From 57905d4b3ae35235f4bde4aa8370ba65541e155a Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Sun, 3 Jan 2021 17:07:59 +0700 Subject: [PATCH 11/35] =?UTF-8?q?=F0=9F=92=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/auras.lua | 2 +- config/general.lua | 2 +- modules/auras/auras.lua | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config/auras.lua b/config/auras.lua index 9f86e74a..04f0186e 100644 --- a/config/auras.lua +++ b/config/auras.lua @@ -209,7 +209,7 @@ local function getOptionsTable_Aura(order, name, filter) if C.db.profile.auras[filter].count[info[#info]] ~= value then C.db.profile.auras[filter].count[info[#info]] = value AURAS:ForHeader(filter, "UpdateConfig") - AURAS:ForHeader(filter, "ForEachButton", "UpdateCountText") + AURAS:ForHeader(filter, "ForEachButton", "UpdateCountFont") end end, args = { diff --git a/config/general.lua b/config/general.lua index ad52155f..7fc92b33 100644 --- a/config/general.lua +++ b/config/general.lua @@ -1852,7 +1852,7 @@ function CONFIG:CreateGeneralPanel(order) BARS:ForBar("xpbar", "UpdateFont") AURAS:ForEach("UpdateConfig") - AURAS:ForEach("ForEach", "UpdateCountText") + AURAS:ForEach("ForEach", "UpdateCountFont") end, args = { font = { diff --git a/modules/auras/auras.lua b/modules/auras/auras.lua index 6c2c3a2e..ad490dfd 100644 --- a/modules/auras/auras.lua +++ b/modules/auras/auras.lua @@ -143,7 +143,7 @@ local function button_UpdateAuraTypeIcon(self) self.showDebuffType = self._parent._config.type.debuff_type end -local function button_UpdateCountText(self) +local function button_UpdateCountFont(self) local config = self._parent._config.count self.Count:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", config.font), config.size, config.outline and "OUTLINE" or nil) @@ -196,10 +196,10 @@ local function handleButton(button, header) button._parent = header button.UpdateAuraTypeIcon = button_UpdateAuraTypeIcon - button.UpdateCountText = button_UpdateCountText + button.UpdateCountFont = button_UpdateCountFont button:UpdateAuraTypeIcon() - button:UpdateCountText() + button:UpdateCountFont() end local function header_OnAttributeChanged(self, attr, value) @@ -246,7 +246,7 @@ local function header_Update(self) self:Hide() self:ForEach("Hide") self:ForEach("UpdateAuraTypeIcon") - self:ForEach("UpdateCountText") + self:ForEach("UpdateCountFont") self:ForEach("SetSize", config.size, config.size) self:UpdateCooldownConfig() self:SetAttribute("filter", self._filter) From dd4f60066426c90e85f3e559d48fb2e1e7bfabb3 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Sun, 3 Jan 2021 17:19:14 +0700 Subject: [PATCH 12/35] Added LSM support for aura tracker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I completely forgot it existed 🤦‍♀️ --- config/auratracker.lua | 25 +++++-------------------- config/general.lua | 4 ++++ core/defaults.lua | 4 ---- modules/auratracker/auratracker.lua | 20 ++++++++------------ 4 files changed, 17 insertions(+), 36 deletions(-) diff --git a/config/auratracker.lua b/config/auratracker.lua index 1fd37660..beb84f75 100644 --- a/config/auratracker.lua +++ b/config/auratracker.lua @@ -221,7 +221,7 @@ function CONFIG.CreateAuraTrackerPanel(_, order) order = 2, type = "range", name = L["SIZE"], - min = 10, max = 32, step = 2, + min = 8, max = 48, step = 1, }, position = { order = 3, @@ -248,8 +248,9 @@ function CONFIG.CreateAuraTrackerPanel(_, order) set = function(info, value) if C.db.char.auratracker.count[info[#info]] ~= value then C.db.char.auratracker.count[info[#info]] = value + AURATRACKER:GetTracker():UpdateConfig() - AURATRACKER:GetTracker():UpdateFontObjects() + AURATRACKER:GetTracker():UpdateCountFont() end end, args = { @@ -257,17 +258,7 @@ function CONFIG.CreateAuraTrackerPanel(_, order) order = 1, type = "range", name = L["SIZE"], - min = 10, max = 20, step = 2, - }, - outline = { - order = 2, - type = "toggle", - name = L["OUTLINE"], - }, - shadow = { - order = 3, - type = "toggle", - name = L["SHADOW"], + min = 8, max = 48, step = 1, }, h_alignment = { order = 4, @@ -369,13 +360,7 @@ function CONFIG.CreateAuraTrackerPanel(_, order) order = 13, type = "range", name = L["SIZE"], - min = 10, max = 20, step = 2, - }, - flag = { - order = 14, - type = "select", - name = L["FLAG"], - values = FLAGS, + min = 8, max = 48, step = 1, }, v_alignment = { order = 15, diff --git a/config/general.lua b/config/general.lua index 7fc92b33..56346ef4 100644 --- a/config/general.lua +++ b/config/general.lua @@ -7,6 +7,7 @@ local CONFIG = P:GetModule("Config") local FILTERS = P:GetModule("Filters") local MINIMAP = P:GetModule("Minimap") local UNITFRAMES = P:GetModule("UnitFrames") +local AURATRACKER = P:GetModule("AuraTracker") -- Lua local _G = getfenv(0) @@ -1853,6 +1854,9 @@ function CONFIG:CreateGeneralPanel(order) AURAS:ForEach("UpdateConfig") AURAS:ForEach("ForEach", "UpdateCountFont") + + AURATRACKER:GetTracker():UpdateConfig() + AURATRACKER:GetTracker():UpdateCountFont() end, args = { font = { diff --git a/core/defaults.lua b/core/defaults.lua index d0270a2b..50e66da2 100644 --- a/core/defaults.lua +++ b/core/defaults.lua @@ -2942,11 +2942,7 @@ D.char = { y_growth = "DOWN", drag_key = "NONE", count = { - enabled = true, size = 12, - outline = true, - shadow = false, - flag = "_Outline", -- "_Shadow", "" h_alignment = "RIGHT", v_alignment = "TOP", }, diff --git a/modules/auratracker/auratracker.lua b/modules/auratracker/auratracker.lua index 7425a83f..eb169016 100644 --- a/modules/auratracker/auratracker.lua +++ b/modules/auratracker/auratracker.lua @@ -136,6 +136,7 @@ end local function bar_UpdateConfig(self) self._config = E:CopyTable(C.db.char.auratracker, self._config) + self._config.count = E:CopyTable(C.db.global.fonts.buttons, self._config.count) end local function bar_UpdateCooldownConfig(self) @@ -172,22 +173,17 @@ local function bar_UpdateLock(self) end end -local function bar_UpdateFontObjects(self) +local function bar_UpdateCountFont(self) local config = self._config.count - local fontObj = "LSFont" .. config.size .. (config.outline and "_Outline" or "") - local count for _, button in next, self._buttons do - count = button.Count - count:SetFontObject(fontObj) - count:SetJustifyH(config.h_alignment) - count:SetJustifyV(config.v_alignment) - count:SetWordWrap(false) + button.Count:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", config.font), config.size, config.outline and "OUTLINE" or nil) + button.Count:SetWordWrap(false) if config.shadow then - count:SetShadowOffset(1, -1) + button.Count:SetShadowOffset(1, -1) else - count:SetShadowOffset(0, 0) + button.Count:SetShadowOffset(0, 0) end end end @@ -243,7 +239,7 @@ function MODULE.Init() bar.UpdateAuraTypeIcons = bar_UpdateAuraTypeIcons bar.UpdateConfig = bar_UpdateConfig bar.UpdateCooldownConfig = bar_UpdateCooldownConfig - bar.UpdateFontObjects = bar_UpdateFontObjects + bar.UpdateCountFont = bar_UpdateCountFont bar.UpdateLock = bar_UpdateLock bar.Header = header @@ -278,7 +274,7 @@ function MODULE.Update() bar:UpdateConfig() bar:UpdateCooldownConfig() bar:UpdateAuraTypeIcons() - bar:UpdateFontObjects() + bar:UpdateCountFont() E:UpdateBarLayout(bar) bar:UpdateLock() bar:Update() From 35c0b8d353535018f97bee94996f320fd89bdc9b Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Sun, 3 Jan 2021 17:59:22 +0700 Subject: [PATCH 13/35] Add LSM support to handled Blizz widgets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now I need to figure out a better way of handling all these fonts and FontStrings 🤔 It isn't really configurable atm 🤔 --- config/blizzard.lua | 16 +- core/defaults.lua | 16 +- core/statusbar.lua | 32 ++- core/templates.xml | 341 ---------------------------- modules/auratracker/auratracker.lua | 4 +- modules/blizzard/characterframe.lua | 10 +- modules/blizzard/digsitebar.lua | 3 +- modules/blizzard/timer.lua | 13 +- modules/loot/loot.lua | 7 +- modules/minimap/minimap.lua | 5 +- 10 files changed, 67 insertions(+), 380 deletions(-) diff --git a/config/blizzard.lua b/config/blizzard.lua index 65a05127..38dbaf62 100644 --- a/config/blizzard.lua +++ b/config/blizzard.lua @@ -463,13 +463,7 @@ function CONFIG.CreateBlizzardPanel(_, order) order = 1, type = "range", name = L["SIZE"], - min = 10, max = 20, step = 2, - }, - flag = { - order = 2, - type = "select", - name = L["FLAG"], - values = FLAGS, + min = 8, max = 48, step = 1, }, }, }, @@ -561,13 +555,7 @@ function CONFIG.CreateBlizzardPanel(_, order) order = 1, type = "range", name = L["SIZE"], - min = 10, max = 20, step = 2, - }, - flag = { - order = 2, - type = "select", - name = L["FLAG"], - values = FLAGS, + min = 8, max = 48, step = 1, }, }, }, diff --git a/core/defaults.lua b/core/defaults.lua index 50e66da2..72fe4a0d 100644 --- a/core/defaults.lua +++ b/core/defaults.lua @@ -206,6 +206,18 @@ D.global = { outline = true, shadow = false, }, + font_1 = { -- default outline font + font = defaultFont, + size = 12, + outline = true, + shadow = false, + }, + font_2 = { -- default shadow font + font = defaultFont, + size = 12, + outline = false, + shadow = true, + }, }, tags = { ["ls:absorb:damage"] = { @@ -2754,7 +2766,6 @@ D.profile = { count = { enabled = true, size = 12, - flag = "_Outline", -- "_Shadow", "" h_alignment = "RIGHT", v_alignment = "TOP", }, @@ -2800,7 +2811,6 @@ D.profile = { count = { enabled = true, size = 12, - flag = "_Outline", -- "_Shadow", "" h_alignment = "RIGHT", v_alignment = "TOP", }, @@ -2901,7 +2911,6 @@ D.profile = { height = 12, text = { size = 12, - flag = "_Shadow", -- "_Outline", "" }, }, timer = { -- MirrorTimer*, TimerTrackerTimer* @@ -2909,7 +2918,6 @@ D.profile = { height = 12, text = { size = 12, - flag = "_Shadow", -- "_Outline", "" }, }, objective_tracker = { -- ObjectiveTrackerFrame diff --git a/core/statusbar.lua b/core/statusbar.lua index 4214e29b..c96f2946 100644 --- a/core/statusbar.lua +++ b/core/statusbar.lua @@ -75,19 +75,25 @@ function E:HandleStatusBar(bar, isRecursive) bar.Bg = bg if not text then - text = bar:CreateFontString(nil, "ARTWORK", "LSFont12_Shadow") - text:SetWordWrap(false) - text:SetJustifyV("MIDDLE") - else - text:SetFontObject("LSFont12_Shadow") - text:SetWordWrap(false) - text:SetJustifyV("MIDDLE") + text = bar:CreateFontString(nil, "ARTWORK") end + local config = C.db.global.fonts.font_2 + + text:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", config.font), config.size, config.outline and "OUTLINE" or "") + text:SetWordWrap(false) + text:SetJustifyV("MIDDLE") text:SetDrawLayer("ARTWORK") text:ClearAllPoints() text:SetPoint("TOPLEFT", 1, 0) text:SetPoint("BOTTOMRIGHT", -1, 0) + + if config.shadow then + text:SetShadowOffset(1, -1) + else + text:SetShadowOffset(0, 0) + end + bar.Text = text sbt:SetTexture("Interface\\BUTTONS\\WHITE8X8") @@ -111,8 +117,18 @@ function E:CreateStatusBar(parent, name, orientation) bg:SetAllPoints() bar.Bg = bg - local text = bar:CreateFontString("$parentText", "ARTWORK", "LSFont12_Shadow") + local config = C.db.global.fonts.font_2 + + local text = bar:CreateFontString("$parentText", "ARTWORK") + text:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", config.font), config.size, config.outline and "OUTLINE" or "") text:SetWordWrap(false) + + if config.shadow then + text:SetShadowOffset(1, -1) + else + text:SetShadowOffset(0, 0) + end + bar.Text = text bar.handled = true diff --git a/core/templates.xml b/core/templates.xml index c038c192..e1dc5352 100644 --- a/core/templates.xml +++ b/core/templates.xml @@ -1,343 +1,2 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/auratracker/auratracker.lua b/modules/auratracker/auratracker.lua index eb169016..39715fbd 100644 --- a/modules/auratracker/auratracker.lua +++ b/modules/auratracker/auratracker.lua @@ -213,7 +213,9 @@ function MODULE.Init() local header = CreateFrame("Frame", "LSAuraTrackerHeader", UIParent) header:SetPoint("CENTER", "UIParent", "CENTER", 0, 0) - local label = header:CreateFontString(nil, "ARTWORK", "LSFont12_Shadow") + local label = header:CreateFontString(nil, "ARTWORK") + label:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.font_2.font), C.db.global.fonts.font_2.size, C.db.global.fonts.font_2.outline and "OUTLINE" or nil) + label:SetShadowOffset(1, -1) label:SetAlpha(0.4) label:SetPoint("LEFT", 2, 0) label:SetWordWrap(false) diff --git a/modules/blizzard/characterframe.lua b/modules/blizzard/characterframe.lua index a170c0d8..02a8a99e 100644 --- a/modules/blizzard/characterframe.lua +++ b/modules/blizzard/characterframe.lua @@ -178,19 +178,23 @@ function MODULE:SetUpCharacterFrame() E:SkinInvSlotButton(slot) slot:SetSize(36, 36) - local enchText = slot:CreateFontString(nil, "ARTWORK", "LSFont10_Outline") + local enchText = slot:CreateFontString(nil, "ARTWORK") + enchText:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.font_2.font), C.db.global.fonts.font_2.size, C.db.global.fonts.font_2.outline and "OUTLINE" or nil) + enchText:SetShadowOffset(1, -1) enchText:SetSize(160, 22) enchText:SetJustifyH(textOnRight and "LEFT" or "RIGHT") enchText:SetJustifyV("TOP") enchText:SetTextColor(0, 1, 0) slot.EnchantText = enchText - local gemText = slot:CreateFontString(nil, "ARTWORK", "LSIcon14Font") + local gemText = slot:CreateFontString(nil, "ARTWORK") + gemText:SetFont(GameFontNormal:GetFont(), 14) gemText:SetSize(157, 14) gemText:SetJustifyH(textOnRight and "LEFT" or "RIGHT") slot.GemText = gemText - local iLvlText = slot:CreateFontString(nil, "ARTWORK", "LSFont12_Outline") + local iLvlText = slot:CreateFontString(nil, "ARTWORK") + iLvlText:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.font_1.font), C.db.global.fonts.font_1.size, C.db.global.fonts.font_1.outline and "OUTLINE" or nil) iLvlText:SetPoint("TOPLEFT", -2, -1) iLvlText:SetPoint("BOTTOMRIGHT", 2, 1) iLvlText:SetJustifyH("RIGHT") diff --git a/modules/blizzard/digsitebar.lua b/modules/blizzard/digsitebar.lua index 7b958819..7b52f469 100644 --- a/modules/blizzard/digsitebar.lua +++ b/modules/blizzard/digsitebar.lua @@ -67,6 +67,7 @@ function MODULE:UpdateDigsiteBar() E:SetStatusBarSkin(ArcheologyDigsiteProgressBar, "HORIZONTAL-" .. config.height) - ArcheologyDigsiteProgressBar.Text:SetFontObject("LSFont" .. config.text.size .. config.text.flag) + ArcheologyDigsiteProgressBar.Text:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.font_2.font), config.text.size, C.db.global.fonts.font_2.outline and "OUTLINE" or nil) + ArcheologyDigsiteProgressBar.Text:SetShadowOffset(1, -1) end end diff --git a/modules/blizzard/timer.lua b/modules/blizzard/timer.lua index 1ee865f1..a4d4a021 100644 --- a/modules/blizzard/timer.lua +++ b/modules/blizzard/timer.lua @@ -41,7 +41,8 @@ local function START_TIMER() E:SetStatusBarSkin(timer.bar, "HORIZONTAL-" .. config.height) local time = timer.bar.Text - time:SetFontObject("LSFont" .. config.text.size .. config.text.flag) + time:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.font_2.font), config.text.size, C.db.global.fonts.font_2.outline and "OUTLINE" or nil) + time:SetShadowOffset(1, -1) time:SetJustifyV("MIDDLE") time:SetJustifyH("RIGHT") time:ClearAllPoints() @@ -114,8 +115,11 @@ function MODULE:UpdateMirrorTimers() E:SetStatusBarSkin(timer, "HORIZONTAL-" .. config.height) - timer.Text:SetFontObject("LSFont" .. config.text.size .. config.text.flag) - timer.Time:SetFontObject("LSFont" .. config.text.size .. config.text.flag) + timer.Text:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.font_2.font), config.text.size, C.db.global.fonts.font_2.outline and "OUTLINE" or nil) + timer.Text:SetShadowOffset(1, -1) + + timer.Time:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.font_2.font), config.text.size, C.db.global.fonts.font_2.outline and "OUTLINE" or nil) + timer.Time:SetShadowOffset(1, -1) end for _, timer in next, TimerTracker.timerList do @@ -123,7 +127,8 @@ function MODULE:UpdateMirrorTimers() E:SetStatusBarSkin(timer.bar, "HORIZONTAL-" .. config.height) - timer.bar.Text:SetFontObject("LSFont" .. config.text.size .. config.text.flag) + timer.bar.Text:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.font_2.font), config.text.size, C.db.global.fonts.font_2.outline and "OUTLINE" or nil) + timer.bar.Text:SetShadowOffset(1, -1) end end end diff --git a/modules/loot/loot.lua b/modules/loot/loot.lua index 5d9c7e29..797f9ea0 100644 --- a/modules/loot/loot.lua +++ b/modules/loot/loot.lua @@ -344,13 +344,16 @@ local function createButton(parent, index) quest:Hide() button.Quest = quest - local count = iconParent:CreateFontString(nil, "OVERLAY", "LSFont12_Outline") + local count = iconParent:CreateFontString(nil, "OVERLAY") + count:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.font_1.font), C.db.global.fonts.font_1.size, C.db.global.fonts.font_1.outline and "OUTLINE" or nil) count:SetPoint("BOTTOMRIGHT", 0, 1) count:SetJustifyH("RIGHT") count:SetVertexColor(1, 1, 1) button.Count = count - local name = button:CreateFontString(nil, "OVERLAY", "LSFont12") + local name = button:CreateFontString(nil, "OVERLAY") + name:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.font_2.font), C.db.global.fonts.font_2.size, C.db.global.fonts.font_2.outline and "OUTLINE" or nil) + name:SetShadowOffset(1, -1) name:SetWordWrap(true) name:SetJustifyH("LEFT") name:SetPoint("TOPLEFT", iconParent, "TOPRIGHT", 6, 0) diff --git a/modules/minimap/minimap.lua b/modules/minimap/minimap.lua index 56da249e..7ec21ca6 100644 --- a/modules/minimap/minimap.lua +++ b/modules/minimap/minimap.lua @@ -1126,7 +1126,7 @@ function MODULE:Init() button:RegisterForDrag("LeftButton") button:SetParent(Minimap) button:ClearAllPoints() - button:SetNormalFontObject("LSFont16_Outline") + button:GetNormalFontObject():SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.font_1.font), 16, C.db.global.fonts.font_1.outline and "OUTLINE" or nil) button:SetPushedTextOffset(1, -1) Minimap.Calendar = button @@ -1233,7 +1233,8 @@ function MODULE:Init() Minimap.Zone = frame local text = MinimapZoneText - text:SetFontObject("LSFont12_Shadow") + text:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.font_2.font), C.db.global.fonts.font_2.size, C.db.global.fonts.font_2.outline and "OUTLINE" or nil) + text:SetShadowOffset(1, -1) text:SetDrawLayer("OVERLAY") text:SetSize(0, 0) text:ClearAllPoints() From 367ec98987a1211fee404b2e8b4a8cea86b4d87f Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Sun, 3 Jan 2021 18:01:36 +0700 Subject: [PATCH 14/35] =?UTF-8?q?=F0=9F=92=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/minimap/minimap.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/minimap/minimap.lua b/modules/minimap/minimap.lua index 7ec21ca6..5eb92d2a 100644 --- a/modules/minimap/minimap.lua +++ b/modules/minimap/minimap.lua @@ -1126,7 +1126,7 @@ function MODULE:Init() button:RegisterForDrag("LeftButton") button:SetParent(Minimap) button:ClearAllPoints() - button:GetNormalFontObject():SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.font_1.font), 16, C.db.global.fonts.font_1.outline and "OUTLINE" or nil) + button:GetFontString():SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.font_1.font), 16, C.db.global.fonts.font_1.outline and "OUTLINE" or nil) button:SetPushedTextOffset(1, -1) Minimap.Calendar = button From 074916565d8a1aac2895ce262f070cf8c0ccd72b Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Thu, 7 Jan 2021 22:09:29 +0700 Subject: [PATCH 15/35] Make ilvl and enchant texts optional --- config/blizzard.lua | 264 ++++++++++++++++------------ core/defaults.lua | 4 + locales/enUS.lua | 4 +- modules/blizzard/characterframe.lua | 68 ++++++- 4 files changed, 219 insertions(+), 121 deletions(-) diff --git a/config/blizzard.lua b/config/blizzard.lua index 38dbaf62..c9170287 100644 --- a/config/blizzard.lua +++ b/config/blizzard.lua @@ -7,6 +7,25 @@ local CONFIG = P:GetModule("Config") local _G = getfenv(0) -- Mine +local offsets = {"", " ", " "} +local function d(c, o, v) + print(offsets[o].."|cff"..c..v.."|r") +end + +local orders = {0, 0, 0} + +local function reset(order) + orders[order] = 1 + -- d("d20000", order, orders[order]) + return orders[order] +end + +local function inc(order) + orders[order] = orders[order] + 1 + -- d("00d200", order, orders[order]) + return orders[order] +end + local DRAG_KEYS = { [1] = _G.ALT_KEY, [2] = _G.CTRL_KEY, @@ -34,12 +53,6 @@ local SHOW_PET_OPTIONS = { [ 1] = L["SHOW"], } -local FLAGS = { - -- [""] = L["NONE"], - ["_Outline"] = L["OUTLINE"], - ["_Shadow"] = L["SHADOW"], -} - local function isModuleDisabled() return not BLIZZARD:IsInit() end @@ -50,9 +63,12 @@ function CONFIG.CreateBlizzardPanel(_, order) type = "group", name = L["BLIZZARD"], childGroups = "tab", + get = function(info) + return C.db.profile.blizzard[info[#info - 1]][info[#info]] + end, args = { enabled = { - order = 1, + order = reset(1), type = "toggle", name = L["ENABLE"], get = function() @@ -70,38 +86,16 @@ function CONFIG.CreateBlizzardPanel(_, order) CONFIG:ShowStaticPopup("RELOAD_UI") end end - end + end, }, spacer_1 = { - order = 9, + order = inc(1), type = "description", name = " ", width = "full", }, - character_frame = { - order = 10, - type = "toggle", - name = L["CHARACTER_FRAME"], - disabled = isModuleDisabled, - get = function() - return C.db.char.blizzard.character_frame.enabled - end, - set = function(_, value) - C.db.char.blizzard.character_frame.enabled = value - - if not BLIZZARD:HasCharacterFrame() then - if value then - BLIZZARD:SetUpCharacterFrame() - end - else - if not value then - CONFIG:ShowStaticPopup("RELOAD_UI") - end - end - end - }, command_bar = { - order = 11, + order = inc(1), type = "toggle", name = L["COMMAND_BAR"], disabled = isModuleDisabled, @@ -120,10 +114,10 @@ function CONFIG.CreateBlizzardPanel(_, order) CONFIG:ShowStaticPopup("RELOAD_UI") end end - end + end, }, durability = { - order = 12, + order = inc(1), type = "toggle", name = L["DURABILITY_FRAME"], disabled = isModuleDisabled, @@ -142,10 +136,10 @@ function CONFIG.CreateBlizzardPanel(_, order) CONFIG:ShowStaticPopup("RELOAD_UI") end end - end + end, }, gm = { - order = 13, + order = inc(1), type = "toggle", name = L["GM_FRAME"], disabled = isModuleDisabled, @@ -164,10 +158,10 @@ function CONFIG.CreateBlizzardPanel(_, order) CONFIG:ShowStaticPopup("RELOAD_UI") end end - end + end, }, mail = { - order = 14, + order = inc(1), type = "toggle", name = L["MAIL"], disabled = isModuleDisabled, @@ -186,10 +180,10 @@ function CONFIG.CreateBlizzardPanel(_, order) CONFIG:ShowStaticPopup("RELOAD_UI") end end - end + end, }, player_alt_power_bar = { - order = 16, + order = inc(1), type = "toggle", name = L["ALT_POWER_BAR"], disabled = isModuleDisabled, @@ -208,10 +202,10 @@ function CONFIG.CreateBlizzardPanel(_, order) CONFIG:ShowStaticPopup("RELOAD_UI") end end - end + end, }, vehicle = { - order = 17, + order = inc(1), type = "toggle", name = L["VEHICLE_SEAT_INDICATOR"], disabled = isModuleDisabled, @@ -230,27 +224,24 @@ function CONFIG.CreateBlizzardPanel(_, order) CONFIG:ShowStaticPopup("RELOAD_UI") end end - end + end, }, castbar = { - order = 18, + order = inc(1), type = "group", name = L["CASTBAR"], disabled = function() return not BLIZZARD:IsInit() or P:GetModule("UnitFrames"):HasPlayerFrame() end, - get = function(info) - return C.db.profile.blizzard[info[#info - 1]][info[#info]] - end, set = function(info, value) - if C.db.profile.blizzard[info[#info - 1]][info[#info]] ~= value then - C.db.profile.blizzard[info[#info - 1]][info[#info]] = value + if C.db.profile.blizzard.castbar[info[#info]] ~= value then + C.db.profile.blizzard.castbar[info[#info]] = value BLIZZARD:UpdateCastBars() end end, args = { enabled = { - order = 1, + order = reset(2), type = "toggle", name = L["ENABLE"], get = function() @@ -268,17 +259,17 @@ function CONFIG.CreateBlizzardPanel(_, order) CONFIG:ShowStaticPopup("RELOAD_UI") end end - end + end, }, show_pet = { - order = 2, + order = inc(2), type = "select", name = L["PET_CASTBAR"], values = SHOW_PET_OPTIONS, }, reset = { type = "execute", - order = 3, + order = inc(2), name = L["RESTORE_DEFAULTS"], confirm = CONFIG.ConfirmReset, func = function() @@ -287,34 +278,34 @@ function CONFIG.CreateBlizzardPanel(_, order) end, }, spacer_1 = { - order = 9, + order = inc(2), type = "description", name = " ", }, width = { - order = 11, + order = inc(2), type = "range", name = L["WIDTH"], min = 96, max = 1024, step = 2, }, height = { - order = 12, + order = inc(2), type = "range", name = L["HEIGHT"], min = 8, max = 32, step = 4, }, latency = { - order = 14, + order = inc(2), type = "toggle", name = L["LATENCY"], }, spacer_2 = { - order = 19, + order = inc(2), type = "description", name = " ", }, icon = { - order = 20, + order = inc(2), type = "select", name = L["ICON"], values = CONFIG.CASTBAR_ICON_POSITIONS, @@ -329,12 +320,12 @@ function CONFIG.CreateBlizzardPanel(_, order) end, }, spacer_3 = { - order = 29, + order = inc(2), type = "description", name = " ", }, text = { - order = 30, + order = inc(2), type = "group", name = L["TEXT"], inline = true, @@ -347,7 +338,7 @@ function CONFIG.CreateBlizzardPanel(_, order) end, args = { font = { - order = 1, + order = reset(3), type = "select", name = L["FONT"], dialogControl = "LSM30_Font", @@ -359,18 +350,18 @@ function CONFIG.CreateBlizzardPanel(_, order) end, }, size = { - order = 2, + order = inc(3), type = "range", name = L["SIZE"], min = 8, max = 32, step = 1, }, outline = { - order = 3, + order = inc(3), type = "toggle", name = L["OUTLINE"], }, shadow = { - order = 4, + order = inc(3), type = "toggle", name = L["SHADOW"], }, @@ -378,23 +369,80 @@ function CONFIG.CreateBlizzardPanel(_, order) }, }, }, + character_frame = { + order = inc(1), + type = "group", + name = L["CHARACTER_FRAME"], + disabled = isModuleDisabled, + set = function(info, value) + if C.db.profile.blizzard.character_frame[info[#info]] ~= value then + C.db.profile.blizzard.character_frame[info[#info]] = value + BLIZZARD:UpadteCharacterFrame() + end + end, + args = { + enabled = { + order = reset(2), + type = "toggle", + name = L["ENABLE"], + get = function() + return C.db.char.blizzard.character_frame.enabled + end, + set = function(_, value) + C.db.char.blizzard.character_frame.enabled = value + + if not BLIZZARD:HasCharacterFrame() then + if value then + BLIZZARD:SetUpCharacterFrame() + end + else + if not value then + CONFIG:ShowStaticPopup("RELOAD_UI") + end + end + end, + }, + reset = { + type = "execute", + order = inc(2), + name = L["RESTORE_DEFAULTS"], + confirm = CONFIG.ConfirmReset, + func = function() + CONFIG:CopySettings(D.profile.blizzard.character_frame, C.db.profile.blizzard.character_frame) + BLIZZARD:UpadteCharacterFrame() + end, + }, + spacer_1 = { + order = inc(2), + type = "description", + name = " ", + }, + ilvl = { + order = inc(2), + type = "toggle", + name = L["ILVL"], + }, + enhancements = { + order = inc(2), + type = "toggle", + name = L["ENCHANTS"], + }, + }, + }, digsite_bar = { - order = 19, + order = inc(1), type = "group", name = L["DIGSITE_BAR"], disabled = isModuleDisabled, - get = function(info) - return C.db.profile.blizzard[info[#info - 1]][info[#info]] - end, set = function(info, value) - if C.db.profile.blizzard[info[#info - 1]][info[#info]] ~= value then - C.db.profile.blizzard[info[#info - 1]][info[#info]] = value + if C.db.profile.blizzard.digsite_bar[info[#info]] ~= value then + C.db.profile.blizzard.digsite_bar[info[#info]] = value BLIZZARD:UpdateDigsiteBar() end end, args = { enabled = { - order = 1, + order = reset(2), type = "toggle", name = L["ENABLE"], get = function() @@ -412,11 +460,11 @@ function CONFIG.CreateBlizzardPanel(_, order) CONFIG:ShowStaticPopup("RELOAD_UI") end end - end + end, }, reset = { type = "execute", - order = 2, + order = inc(2), name = L["RESTORE_DEFAULTS"], confirm = CONFIG.ConfirmReset, func = function() @@ -425,29 +473,29 @@ function CONFIG.CreateBlizzardPanel(_, order) end, }, spacer_1 = { - order = 9, + order = inc(2), type = "description", name = " ", }, width = { - order = 11, + order = inc(2), type = "range", name = L["WIDTH"], min = 128, max = 1024, step = 2, }, height = { - order = 12, + order = inc(2), type = "range", name = L["HEIGHT"], min = 8, max = 32, step = 4, }, spacer_2 = { - order = 19, + order = inc(2), type = "description", name = " ", }, text = { - order = 20, + order = inc(2), type = "group", name = L["TEXT"], inline = true, @@ -460,7 +508,7 @@ function CONFIG.CreateBlizzardPanel(_, order) end, args = { size = { - order = 1, + order = reset(3), type = "range", name = L["SIZE"], min = 8, max = 48, step = 1, @@ -470,23 +518,20 @@ function CONFIG.CreateBlizzardPanel(_, order) }, }, timer = { - order = 20, + order = inc(1), type = "group", name = L["MIRROR_TIMER"], desc = L["MIRROR_TIMER_DESC"], disabled = isModuleDisabled, - get = function(info) - return C.db.profile.blizzard[info[#info - 1]][info[#info]] - end, set = function(info, value) - if C.db.profile.blizzard[info[#info - 1]][info[#info]] ~= value then - C.db.profile.blizzard[info[#info - 1]][info[#info]] = value + if C.db.profile.blizzard.timer[info[#info]] ~= value then + C.db.profile.blizzard.timer[info[#info]] = value BLIZZARD:UpdateMirrorTimers() end end, args = { enabled = { - order = 1, + order = reset(2), type = "toggle", name = L["ENABLE"], get = function() @@ -504,11 +549,11 @@ function CONFIG.CreateBlizzardPanel(_, order) CONFIG:ShowStaticPopup("RELOAD_UI") end end - end + end, }, reset = { + order = inc(2), type = "execute", - order = 2, name = L["RESTORE_DEFAULTS"], confirm = CONFIG.ConfirmReset, func = function() @@ -517,29 +562,29 @@ function CONFIG.CreateBlizzardPanel(_, order) end, }, spacer_1 = { - order = 9, + order = inc(2), type = "description", name = " ", }, width = { - order = 11, + order = inc(2), type = "range", name = L["WIDTH"], min = 128, max = 1024, step = 2, }, height = { - order = 12, + order = inc(2), type = "range", name = L["HEIGHT"], min = 8, max = 32, step = 4, }, spacer_2 = { - order = 19, + order = inc(2), type = "description", name = " ", }, text = { - order = 20, + order = inc(2), type = "group", name = L["TEXT"], inline = true, @@ -552,7 +597,7 @@ function CONFIG.CreateBlizzardPanel(_, order) end, args = { size = { - order = 1, + order = reset(3), type = "range", name = L["SIZE"], min = 8, max = 48, step = 1, @@ -562,13 +607,13 @@ function CONFIG.CreateBlizzardPanel(_, order) }, }, objective_tracker = { - order = 21, + order = inc(1), type = "group", name = L["OBJECTIVE_TRACKER"], disabled = isModuleDisabled, args = { enabled = { - order = 1, + order = reset(2), type = "toggle", name = L["ENABLE"], get = function() @@ -586,11 +631,11 @@ function CONFIG.CreateBlizzardPanel(_, order) CONFIG:ShowStaticPopup("RELOAD_UI") end end - end + end, }, reset = { type = "execute", - order = 2, + order = inc(2), name = L["RESTORE_DEFAULTS"], confirm = CONFIG.ConfirmReset, func = function() @@ -599,12 +644,12 @@ function CONFIG.CreateBlizzardPanel(_, order) end, }, spacer_1 = { - order = 9, + order = inc(2), type = "description", name = " ", }, height = { - order = 10, + order = inc(2), type = "range", name = L["HEIGHT"], disabled = function() return not BLIZZARD:HasObjectiveTracker() end, @@ -618,7 +663,7 @@ function CONFIG.CreateBlizzardPanel(_, order) end, }, drag_key = { - order = 11, + order = inc(2), type = "select", name = L["DRAG_KEY"], values = DRAG_KEYS, @@ -632,19 +677,16 @@ function CONFIG.CreateBlizzardPanel(_, order) }, }, talking_head = { - order = 22, + order = inc(1), type = "group", name = L["TALKING_HEAD_FRAME"], disabled = isModuleDisabled, - get = function(info) - return C.db.profile.blizzard.talking_head[info[#info]] - end, set = function(info, value) C.db.profile.blizzard.talking_head[info[#info]] = value end, args = { enabled = { - order = 1, + order = reset(2), type = "toggle", name = L["ENABLE"], get = function() @@ -662,11 +704,11 @@ function CONFIG.CreateBlizzardPanel(_, order) CONFIG:ShowStaticPopup("RELOAD_UI") end end - end + end, }, reset = { type = "execute", - order = 2, + order = inc(2), name = L["RESTORE_DEFAULTS"], confirm = CONFIG.ConfirmReset, func = function() @@ -674,12 +716,12 @@ function CONFIG.CreateBlizzardPanel(_, order) end, }, spacer_1 = { - order = 9, + order = inc(2), type = "description", name = " ", }, hide = { - order = 10, + order = inc(2), type = "toggle", name = L["HIDE"], }, diff --git a/core/defaults.lua b/core/defaults.lua index 72fe4a0d..e8e0097b 100644 --- a/core/defaults.lua +++ b/core/defaults.lua @@ -2906,6 +2906,10 @@ D.profile = { show_pet = -1, -- -1 - auto, 0 - false, 1 - true latency = true, }, + character_frame = { + ilvl = true, + enhancements = true, + }, digsite_bar = { -- ArcheologyDigsiteProgressBar width = 200, height = 12, diff --git a/locales/enUS.lua b/locales/enUS.lua index c20a53b0..7f9bb90e 100644 --- a/locales/enUS.lua +++ b/locales/enUS.lua @@ -27,6 +27,7 @@ L["DAMAGER_RED"] = E:WrapText(D.global.colors.red, _G.DAMAGER) L["DELETE"] = _G.DELETE L["DURABILITY_COLON"] = _G.DURABILITY..":" L["ENABLE"] = _G.ENABLE +L["ENCHANTS"] = _G.AUCTION_CATEGORY_ITEM_ENHANCEMENT L["ENERGY"] = _G.ENERGY L["ERROR_RED"] = E:WrapText(D.global.colors.red, _G.ERROR_CAPS) L["FACTION"] = _G.FACTION @@ -37,11 +38,12 @@ L["FEATURE_NOT_AVAILBLE_NEUTRAL"] = _G.FEATURE_NOT_AVAILBLE_PANDAREN L["FOCUS"] = _G.FOCUS L["FOREIGN_SERVER_LABEL"] = _G.FOREIGN_SERVER_LABEL:gsub("%s", "") L["FURY"] = _G.FURY -L["GENERAL"] = _G.GENERAL_LABEL L["GARRISON"] = _G.GARRISON_LOCATION_TOOLTIP +L["GENERAL"] = _G.GENERAL_LABEL L["HEALER_GREEN"] = E:WrapText(D.global.colors.green, _G.HEALER) L["HIDE"] = _G.HIDE L["HOLY_POWER"] = _G.HOLY_POWER +L["ILVL"] = _G.ITEM_LEVEL_ABBR L["INSANITY"] = _G.INSANITY L["LOOT"] = _G.LOOT_NOUN L["LUA_ERROR"] = _G.LUA_ERROR ..": %s" diff --git a/modules/blizzard/characterframe.lua b/modules/blizzard/characterframe.lua index 02a8a99e..23f880d6 100644 --- a/modules/blizzard/characterframe.lua +++ b/modules/blizzard/characterframe.lua @@ -65,6 +65,8 @@ local function scanSlot(slotID) if link then return true, GetDetailedItemLevelInfo(link), E:GetItemEnchantGemInfo(link) elseif GetInventoryItemTexture("player", slotID) then + -- if there's no link, but there's a texture, it means that there's + -- an item we have no info for return false, "", "", "", "", "" end @@ -72,26 +74,66 @@ local function scanSlot(slotID) end local function updateSlot(slotID) + if not (C.db.profile.blizzard.character_frame.ilvl or C.db.profile.blizzard.character_frame.enhancements) then + _G[EQUIP_SLOTS[slotID]].ItemLevelText:SetText("") + _G[EQUIP_SLOTS[slotID]].EnchantText:SetText("") + _G[EQUIP_SLOTS[slotID]].GemText:SetText("") + + return + end + local isOk, iLvl, enchant, gem1, gem2, gem3 = scanSlot(slotID) if isOk then - _G[EQUIP_SLOTS[slotID]].ItemLevelText:SetText(iLvl) - _G[EQUIP_SLOTS[slotID]].ItemLevelText:SetTextColor(getItemLevelColor(iLvl)) - _G[EQUIP_SLOTS[slotID]].EnchantText:SetText(enchant) - _G[EQUIP_SLOTS[slotID]].GemText:SetText(s_trim(gem1 .. gem2 .. gem3)) + if C.db.profile.blizzard.character_frame.ilvl then + _G[EQUIP_SLOTS[slotID]].ItemLevelText:SetText(iLvl) + _G[EQUIP_SLOTS[slotID]].ItemLevelText:SetTextColor(getItemLevelColor(iLvl)) + else + _G[EQUIP_SLOTS[slotID]].ItemLevelText:SetText("") + end + + if C.db.profile.blizzard.character_frame.enhancements then + _G[EQUIP_SLOTS[slotID]].EnchantText:SetText(enchant) + _G[EQUIP_SLOTS[slotID]].GemText:SetText(s_trim(gem1 .. gem2 .. gem3)) + else + _G[EQUIP_SLOTS[slotID]].EnchantText:SetText("") + _G[EQUIP_SLOTS[slotID]].GemText:SetText("") + end else C_Timer.After(0.33, function() updateSlot(slotID) end) end end local function updateAllSlots() - local scanComplete, isOk, iLvl, enchant, gem1, gem2, gem3 = true + if not (C.db.profile.blizzard.character_frame.ilvl or C.db.profile.blizzard.character_frame.enhancements) then + for _, slotName in next, EQUIP_SLOTS do + _G[slotName].ItemLevelText:SetText("") + _G[slotName].EnchantText:SetText("") + _G[slotName].GemText:SetText("") + end + + return + end + + local scanComplete = true + local showILvl, showEnchants = C.db.profile.blizzard.character_frame.ilvl, C.db.profile.blizzard.character_frame.enhancements + local isOk, iLvl, enchant, gem1, gem2, gem3 for slotID, slotName in next, EQUIP_SLOTS do isOk, iLvl, enchant, gem1, gem2, gem3 = scanSlot(slotID) - _G[slotName].ItemLevelText:SetText(iLvl) - _G[slotName].ItemLevelText:SetTextColor(getItemLevelColor(iLvl)) - _G[slotName].EnchantText:SetText(enchant) - _G[slotName].GemText:SetText(s_trim(gem1 .. gem2 .. gem3)) + if showILvl then + _G[slotName].ItemLevelText:SetText(iLvl) + _G[slotName].ItemLevelText:SetTextColor(getItemLevelColor(iLvl)) + else + _G[slotName].ItemLevelText:SetText("") + end + + if showEnchants then + _G[slotName].EnchantText:SetText(enchant) + _G[slotName].GemText:SetText(s_trim(gem1 .. gem2 .. gem3)) + else + _G[slotName].EnchantText:SetText("") + _G[slotName].GemText:SetText("") + end scanComplete = scanComplete and isOk end @@ -287,3 +329,11 @@ function MODULE:SetUpCharacterFrame() isInit = true end end + +function MODULE:UpadteCharacterFrame() + if not isInit then + return + end + + updateAllSlots() +end From a945540ef0c780e3e92114e16dcbfc30db8aba9c Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Thu, 7 Jan 2021 22:09:37 +0700 Subject: [PATCH 16/35] =?UTF-8?q?=F0=9F=92=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/utils.lua b/core/utils.lua index 4469139a..3aac6d09 100644 --- a/core/utils.lua +++ b/core/utils.lua @@ -793,7 +793,7 @@ do itemCache[itemLink] = {} end - wipeScanTip(scanTip) + wipeScanTip() scanTip:SetHyperlink(itemLink) local enchant, text = "" From cdb0cb0b1ec04168887edb8984235f46ecaf5038 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Thu, 7 Jan 2021 22:11:06 +0700 Subject: [PATCH 17/35] Use Blizz fonts for gem and enchant texts The new rule is to use Blizz fonts when I'm adding something to the default UI elements, and use LSM for custom and completely overhauled widgets --- modules/blizzard/characterframe.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/blizzard/characterframe.lua b/modules/blizzard/characterframe.lua index 23f880d6..6240337e 100644 --- a/modules/blizzard/characterframe.lua +++ b/modules/blizzard/characterframe.lua @@ -221,8 +221,7 @@ function MODULE:SetUpCharacterFrame() slot:SetSize(36, 36) local enchText = slot:CreateFontString(nil, "ARTWORK") - enchText:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.font_2.font), C.db.global.fonts.font_2.size, C.db.global.fonts.font_2.outline and "OUTLINE" or nil) - enchText:SetShadowOffset(1, -1) + enchText:SetFontObject("GameFontNormalSmall") enchText:SetSize(160, 22) enchText:SetJustifyH(textOnRight and "LEFT" or "RIGHT") enchText:SetJustifyV("TOP") @@ -230,13 +229,13 @@ function MODULE:SetUpCharacterFrame() slot.EnchantText = enchText local gemText = slot:CreateFontString(nil, "ARTWORK") - gemText:SetFont(GameFontNormal:GetFont(), 14) + gemText:SetFont("Fonts\\ARIALN.TTF", 14) -- it only displays icons gemText:SetSize(157, 14) gemText:SetJustifyH(textOnRight and "LEFT" or "RIGHT") slot.GemText = gemText local iLvlText = slot:CreateFontString(nil, "ARTWORK") - iLvlText:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.font_1.font), C.db.global.fonts.font_1.size, C.db.global.fonts.font_1.outline and "OUTLINE" or nil) + iLvlText:SetFontObject("Game12Font_o1") iLvlText:SetPoint("TOPLEFT", -2, -1) iLvlText:SetPoint("BOTTOMRIGHT", 2, 1) iLvlText:SetJustifyH("RIGHT") From b83e04168568b90704b77afde03ffb84a2eb6f3d Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Sat, 9 Jan 2021 19:32:00 +0700 Subject: [PATCH 18/35] Fix quest/archaeology blobs on square minimap --- modules/minimap/minimap.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/minimap/minimap.lua b/modules/minimap/minimap.lua index 5eb92d2a..6684b281 100644 --- a/modules/minimap/minimap.lua +++ b/modules/minimap/minimap.lua @@ -869,6 +869,8 @@ function MODULE:Init() ignoredChildren[textureParent] = true if isSquare then + Minimap:SetArchBlobRingScalar(0) + Minimap:SetQuestBlobRingScalar(0) Minimap:SetMaskTexture("Interface\\BUTTONS\\WHITE8X8") Minimap:SetPoint("BOTTOM", 0, 0) @@ -907,6 +909,8 @@ function MODULE:Init() mid:SetPoint("BOTTOMRIGHT", right, "BOTTOMLEFT", 0, 0) Minimap.SepMiddle = mid else + Minimap:SetArchBlobRingScalar(1) + Minimap:SetQuestBlobRingScalar(1) Minimap:SetMaskTexture("Interface\\CHARACTERFRAME\\TempPortraitAlphaMask") Minimap:SetPoint("BOTTOM", 0, 10) From 58bf9e6b137fb59a7c15c4ccee5cbcb1d736f709 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Sat, 9 Jan 2021 19:32:15 +0700 Subject: [PATCH 19/35] =?UTF-8?q?=F0=9F=92=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/blizzard/characterframe.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/blizzard/characterframe.lua b/modules/blizzard/characterframe.lua index 6240337e..1cb22fbd 100644 --- a/modules/blizzard/characterframe.lua +++ b/modules/blizzard/characterframe.lua @@ -260,7 +260,7 @@ function MODULE:SetUpCharacterFrame() CharacterModelFrame:SetSize(0, 0) CharacterModelFrame:ClearAllPoints() CharacterModelFrame:SetPoint("TOPLEFT", CharacterFrame.Inset, 0, 0) - CharacterModelFrame:SetPoint("BOTTOMRIGHT", CharacterFrame.Inset, 0, 44) + CharacterModelFrame:SetPoint("BOTTOMRIGHT", CharacterFrame.Inset, 0, 0) for _, texture in next, TEXTURES_TO_REMOVE do texture:SetTexture(nil) From 92d1a1ed6454cd8efe3eb080acda486257e27a34 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Sat, 9 Jan 2021 20:18:55 +0700 Subject: [PATCH 20/35] =?UTF-8?q?=F0=9F=92=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/auratracker/auratracker.lua | 3 +-- modules/loot/loot.lua | 5 ++--- modules/minimap/minimap.lua | 4 +--- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/modules/auratracker/auratracker.lua b/modules/auratracker/auratracker.lua index 39715fbd..c937a1c8 100644 --- a/modules/auratracker/auratracker.lua +++ b/modules/auratracker/auratracker.lua @@ -214,8 +214,7 @@ function MODULE.Init() header:SetPoint("CENTER", "UIParent", "CENTER", 0, 0) local label = header:CreateFontString(nil, "ARTWORK") - label:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.font_2.font), C.db.global.fonts.font_2.size, C.db.global.fonts.font_2.outline and "OUTLINE" or nil) - label:SetShadowOffset(1, -1) + label:SetFontObject("GameFontNormal") label:SetAlpha(0.4) label:SetPoint("LEFT", 2, 0) label:SetWordWrap(false) diff --git a/modules/loot/loot.lua b/modules/loot/loot.lua index 797f9ea0..7bbfb915 100644 --- a/modules/loot/loot.lua +++ b/modules/loot/loot.lua @@ -345,15 +345,14 @@ local function createButton(parent, index) button.Quest = quest local count = iconParent:CreateFontString(nil, "OVERLAY") - count:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.font_1.font), C.db.global.fonts.font_1.size, C.db.global.fonts.font_1.outline and "OUTLINE" or nil) + count:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.buttons.font), 12, C.db.global.fonts.buttons.outline and "OUTLINE" or nil) count:SetPoint("BOTTOMRIGHT", 0, 1) count:SetJustifyH("RIGHT") count:SetVertexColor(1, 1, 1) button.Count = count local name = button:CreateFontString(nil, "OVERLAY") - name:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.font_2.font), C.db.global.fonts.font_2.size, C.db.global.fonts.font_2.outline and "OUTLINE" or nil) - name:SetShadowOffset(1, -1) + name:SetFontObject("GameFontNormal") name:SetWordWrap(true) name:SetJustifyH("LEFT") name:SetPoint("TOPLEFT", iconParent, "TOPRIGHT", 6, 0) diff --git a/modules/minimap/minimap.lua b/modules/minimap/minimap.lua index 6684b281..b5620d40 100644 --- a/modules/minimap/minimap.lua +++ b/modules/minimap/minimap.lua @@ -1130,7 +1130,7 @@ function MODULE:Init() button:RegisterForDrag("LeftButton") button:SetParent(Minimap) button:ClearAllPoints() - button:GetFontString():SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.font_1.font), 16, C.db.global.fonts.font_1.outline and "OUTLINE" or nil) + button:SetNormalFontObject("Game15Font_o1") button:SetPushedTextOffset(1, -1) Minimap.Calendar = button @@ -1237,8 +1237,6 @@ function MODULE:Init() Minimap.Zone = frame local text = MinimapZoneText - text:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.font_2.font), C.db.global.fonts.font_2.size, C.db.global.fonts.font_2.outline and "OUTLINE" or nil) - text:SetShadowOffset(1, -1) text:SetDrawLayer("OVERLAY") text:SetSize(0, 0) text:ClearAllPoints() From d1127d598532e2b580698027f63efa2735c64f21 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Sat, 9 Jan 2021 20:28:14 +0700 Subject: [PATCH 21/35] Add taintless by foxlit --- ls_UI.toc | 1 + taintless.xml | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 taintless.xml diff --git a/ls_UI.toc b/ls_UI.toc index f99a5457..ac74e11f 100644 --- a/ls_UI.toc +++ b/ls_UI.toc @@ -7,6 +7,7 @@ ## SavedVariables: LS_UI_GLOBAL_CONFIG ## OptionalDeps: AdiButtonAuras, Masque, MaxDps, MinimapButtonFrame +taintless.xml embeds\_embeds.xml core\_core.xml locales\_locales.xml diff --git a/taintless.xml b/taintless.xml new file mode 100644 index 00000000..7b02fab1 --- /dev/null +++ b/taintless.xml @@ -0,0 +1,63 @@ + \ No newline at end of file From b96cd5ca18f7c3d79866f474f301450914888e1f Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Sat, 9 Jan 2021 22:13:14 +0700 Subject: [PATCH 22/35] =?UTF-8?q?=F0=9F=92=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/general.lua | 145 -------------------------------- core/defaults.lua | 9 +- core/statusbar.lua | 8 +- modules/bars/xpbar.lua | 3 +- modules/blizzard/digsitebar.lua | 2 +- modules/blizzard/timer.lua | 8 +- 6 files changed, 11 insertions(+), 164 deletions(-) diff --git a/config/general.lua b/config/general.lua index 56346ef4..2feb6f7e 100644 --- a/config/general.lua +++ b/config/general.lua @@ -1785,151 +1785,6 @@ function CONFIG:CreateGeneralPanel(order) }, }, }, - fonts = { - order = 2, - type = "group", - childGroups = "tree", - name = L["FONTS"], - get = function(info) - return C.db.global.fonts[info[#info - 1]][info[#info]] - end, - args = { - cooldown = { - order = 1, - type = "group", - name = L["COOLDOWN"], - set = function(info, value) - C.db.global.fonts.cooldown[info[#info]] = value - - E.Cooldowns:ForEach("UpdateConfig") - E.Cooldowns:ForEach("UpdateFont") - end, - args = { - font = { - order = 1, - type = "select", - name = L["NAME"], - dialogControl = "LSM30_Font", - values = LibStub("LibSharedMedia-3.0"):HashTable("font"), - get = function() - return LibStub("LibSharedMedia-3.0"):IsValid("font", C.db.global.fonts.cooldown.font) - and C.db.global.fonts.cooldown.font - or LibStub("LibSharedMedia-3.0"):GetDefault("font") - end, - }, - outline = { - order = 2, - type = "toggle", - name = L["OUTLINE"], - }, - shadow = { - order = 3, - type = "toggle", - name = L["SHADOW"], - }, - }, - }, - buttons = { - order = 2, - type = "group", - name = L["BUTTONS"], - set = function(info, value) - C.db.global.fonts.buttons[info[#info]] = value - - BARS:ForBar("bar1", "UpdateConfig") - BARS:ForBar("bar2", "UpdateConfig") - BARS:ForBar("bar3", "UpdateConfig") - BARS:ForBar("bar4", "UpdateConfig") - BARS:ForBar("bar5", "UpdateConfig") - BARS:ForBar("bar6", "UpdateConfig") - BARS:ForBar("bar7", "UpdateConfig") - BARS:ForBar("pet_battle", "UpdateConfig") - BARS:ForBar("extra", "UpdateConfig") - BARS:ForBar("xpbar", "UpdateConfig") - - BARS:ForEach("ForEach", "UpdateCountFont") - BARS:ForEach("ForEach", "UpdateHotKeyFont") - BARS:ForEach("ForEach", "UpdateMacroFont") - BARS:ForBar("xpbar", "UpdateFont") - - AURAS:ForEach("UpdateConfig") - AURAS:ForEach("ForEach", "UpdateCountFont") - - AURATRACKER:GetTracker():UpdateConfig() - AURATRACKER:GetTracker():UpdateCountFont() - end, - args = { - font = { - order = 1, - type = "select", - name = L["NAME"], - dialogControl = "LSM30_Font", - values = LibStub("LibSharedMedia-3.0"):HashTable("font"), - get = function() - return LibStub("LibSharedMedia-3.0"):IsValid("font", C.db.global.fonts.buttons.font) - and C.db.global.fonts.buttons.font - or LibStub("LibSharedMedia-3.0"):GetDefault("font") - end, - }, - outline = { - order = 2, - type = "toggle", - name = L["OUTLINE"], - }, - shadow = { - order = 3, - type = "toggle", - name = L["SHADOW"], - }, - }, - }, - units = { - order = 3, - type = "group", - name = L["UNITS"], - set = function(info, value) - C.db.global.fonts.units[info[#info]] = value - - UNITFRAMES:ForEach("ForElement", "Health", "UpdateConfig") - UNITFRAMES:ForEach("ForElement", "Health", "UpdateFonts") - UNITFRAMES:ForEach("ForElement", "HealthPrediction", "UpdateConfig") - UNITFRAMES:ForEach("ForElement", "HealthPrediction", "UpdateFonts") - UNITFRAMES:ForEach("ForElement", "Power", "UpdateConfig") - UNITFRAMES:ForEach("ForElement", "Power", "UpdateFonts") - UNITFRAMES:ForEach("ForElement", "AlternativePower", "UpdateConfig") - UNITFRAMES:ForEach("ForElement", "AlternativePower", "UpdateFonts") - UNITFRAMES:ForEach("ForElement", "Castbar", "UpdateConfig") - UNITFRAMES:ForEach("ForElement", "Castbar", "UpdateFonts") - UNITFRAMES:ForEach("ForElement", "Name", "UpdateConfig") - UNITFRAMES:ForEach("ForElement", "Name", "UpdateFonts") - end, - args = { - font = { - order = 1, - type = "select", - name = L["NAME"], - dialogControl = "LSM30_Font", - values = LibStub("LibSharedMedia-3.0"):HashTable("font"), - get = function() - return LibStub("LibSharedMedia-3.0"):IsValid("font", C.db.global.fonts.units.font) - and C.db.global.fonts.units.font - or LibStub("LibSharedMedia-3.0"):GetDefault("font") - end, - }, - outline = { - order = 2, - type = "toggle", - name = L["OUTLINE"], - }, - shadow = { - order = 3, - type = "toggle", - name = L["SHADOW"], - }, - }, - }, - }, - }, tags = { order = 3, type = "group", diff --git a/core/defaults.lua b/core/defaults.lua index e8e0097b..238dd81a 100644 --- a/core/defaults.lua +++ b/core/defaults.lua @@ -206,15 +206,8 @@ D.global = { outline = true, shadow = false, }, - font_1 = { -- default outline font + statusbars = { font = defaultFont, - size = 12, - outline = true, - shadow = false, - }, - font_2 = { -- default shadow font - font = defaultFont, - size = 12, outline = false, shadow = true, }, diff --git a/core/statusbar.lua b/core/statusbar.lua index c96f2946..c0d5f304 100644 --- a/core/statusbar.lua +++ b/core/statusbar.lua @@ -78,9 +78,9 @@ function E:HandleStatusBar(bar, isRecursive) text = bar:CreateFontString(nil, "ARTWORK") end - local config = C.db.global.fonts.font_2 + local config = C.db.global.fonts.statusbars - text:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", config.font), config.size, config.outline and "OUTLINE" or "") + text:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", config.font), 12, config.outline and "OUTLINE" or "") text:SetWordWrap(false) text:SetJustifyV("MIDDLE") text:SetDrawLayer("ARTWORK") @@ -117,10 +117,10 @@ function E:CreateStatusBar(parent, name, orientation) bg:SetAllPoints() bar.Bg = bg - local config = C.db.global.fonts.font_2 + local config = C.db.global.fonts.statusbars local text = bar:CreateFontString("$parentText", "ARTWORK") - text:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", config.font), config.size, config.outline and "OUTLINE" or "") + text:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", config.font), 12, config.outline and "OUTLINE" or "") text:SetWordWrap(false) if config.shadow then diff --git a/modules/bars/xpbar.lua b/modules/bars/xpbar.lua index 4abd8c66..845758ae 100644 --- a/modules/bars/xpbar.lua +++ b/modules/bars/xpbar.lua @@ -84,8 +84,7 @@ local function bar_UpdateConfig(self) self._config.text = E:CopyTable(C.db.profile.bars.xpbar.text, self._config.text) end - -- FIX ME! Should be controlled by a different font type which is NYI - self._config.text = E:CopyTable(C.db.global.fonts.buttons, self._config.text) + self._config.text = E:CopyTable(C.db.global.fonts.statusbars, self._config.text) end local function updateFont(fontString, config) diff --git a/modules/blizzard/digsitebar.lua b/modules/blizzard/digsitebar.lua index 7b52f469..33d8b079 100644 --- a/modules/blizzard/digsitebar.lua +++ b/modules/blizzard/digsitebar.lua @@ -67,7 +67,7 @@ function MODULE:UpdateDigsiteBar() E:SetStatusBarSkin(ArcheologyDigsiteProgressBar, "HORIZONTAL-" .. config.height) - ArcheologyDigsiteProgressBar.Text:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.font_2.font), config.text.size, C.db.global.fonts.font_2.outline and "OUTLINE" or nil) + ArcheologyDigsiteProgressBar.Text:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.statusbars.font), config.text.size, C.db.global.fonts.statusbars.outline and "OUTLINE" or nil) ArcheologyDigsiteProgressBar.Text:SetShadowOffset(1, -1) end end diff --git a/modules/blizzard/timer.lua b/modules/blizzard/timer.lua index a4d4a021..7a7a9c21 100644 --- a/modules/blizzard/timer.lua +++ b/modules/blizzard/timer.lua @@ -41,7 +41,7 @@ local function START_TIMER() E:SetStatusBarSkin(timer.bar, "HORIZONTAL-" .. config.height) local time = timer.bar.Text - time:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.font_2.font), config.text.size, C.db.global.fonts.font_2.outline and "OUTLINE" or nil) + time:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.statusbars.font), config.text.size, C.db.global.fonts.statusbars.outline and "OUTLINE" or nil) time:SetShadowOffset(1, -1) time:SetJustifyV("MIDDLE") time:SetJustifyH("RIGHT") @@ -115,10 +115,10 @@ function MODULE:UpdateMirrorTimers() E:SetStatusBarSkin(timer, "HORIZONTAL-" .. config.height) - timer.Text:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.font_2.font), config.text.size, C.db.global.fonts.font_2.outline and "OUTLINE" or nil) + timer.Text:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.statusbars.font), config.text.size, C.db.global.fonts.statusbars.outline and "OUTLINE" or nil) timer.Text:SetShadowOffset(1, -1) - timer.Time:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.font_2.font), config.text.size, C.db.global.fonts.font_2.outline and "OUTLINE" or nil) + timer.Time:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.statusbars.font), config.text.size, C.db.global.fonts.statusbars.outline and "OUTLINE" or nil) timer.Time:SetShadowOffset(1, -1) end @@ -127,7 +127,7 @@ function MODULE:UpdateMirrorTimers() E:SetStatusBarSkin(timer.bar, "HORIZONTAL-" .. config.height) - timer.bar.Text:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.font_2.font), config.text.size, C.db.global.fonts.font_2.outline and "OUTLINE" or nil) + timer.bar.Text:SetFont(LibStub("LibSharedMedia-3.0"):Fetch("font", C.db.global.fonts.statusbars.font), config.text.size, C.db.global.fonts.statusbars.outline and "OUTLINE" or nil) timer.bar.Text:SetShadowOffset(1, -1) end end From 62326891852d56059cc286e765a30950c06ef443 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Sat, 9 Jan 2021 22:15:35 +0700 Subject: [PATCH 23/35] Add fonts options to general/fonts.lua I really got tired of scrolling through huge files --- config/_config.xml | 1 + config/general.lua | 2 + config/general/_general.xml | 4 + config/general/core.lua | 1 + config/general/fonts.lua | 226 ++++++++++++++++++++++++++++++++++++ locales/enUS.lua | 1 + 6 files changed, 235 insertions(+) create mode 100644 config/general/_general.xml create mode 100644 config/general/core.lua create mode 100644 config/general/fonts.lua diff --git a/config/_config.xml b/config/_config.xml index 7fe0fa19..f36e0cca 100644 --- a/config/_config.xml +++ b/config/_config.xml @@ -4,6 +4,7 @@