diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..d686fcb --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,14 @@ +# These are supported funding model platforms + +github: [NoM0Re] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry +custom: https://streamelements.com/noom0re/tip + diff --git a/WeakAuras/AuraEnvironment.lua b/WeakAuras/AuraEnvironment.lua index da01f41..e966cc2 100644 --- a/WeakAuras/AuraEnvironment.lua +++ b/WeakAuras/AuraEnvironment.lua @@ -161,7 +161,7 @@ local blockedTables = { MailFrameTab2 = true, DEFAULT_CHAT_FRAME = true, ChatFrame1 = true, - --WeakAurasSaved = true, + WeakAurasSaved = true, WeakAurasOptions = true, WeakAurasOptionsSaved = true } diff --git a/WeakAuras/RegionTypes/AuraBar.lua b/WeakAuras/RegionTypes/AuraBar.lua index 0ee7041..7b59ea4 100644 --- a/WeakAuras/RegionTypes/AuraBar.lua +++ b/WeakAuras/RegionTypes/AuraBar.lua @@ -1020,7 +1020,7 @@ local funcs = { end iconPath = iconPath or self.displayIcon or "Interface\\Icons\\INV_Misc_QuestionMark" - self.icon:SetTexture(iconPath) + Private.SetTextureOrSpellTexture(self.icon, iconPath) end, SetOverlayColor = function(self, id, r, g, b, a) self.bar:SetAdditionalBarColor(id, { r, g, b, a}); diff --git a/WeakAuras/RegionTypes/Icon.lua b/WeakAuras/RegionTypes/Icon.lua index da1727c..1da513b 100644 --- a/WeakAuras/RegionTypes/Icon.lua +++ b/WeakAuras/RegionTypes/Icon.lua @@ -557,7 +557,7 @@ local function modify(parent, region, data) end iconPath = iconPath or self.displayIcon or "Interface\\Icons\\INV_Misc_QuestionMark" - icon:SetTexture(iconPath) + Private.SetTextureOrSpellTexture(icon, iconPath) end function region:Scale(scalex, scaley) diff --git a/WeakAuras/RegionTypes/RegionPrototype.lua b/WeakAuras/RegionTypes/RegionPrototype.lua index 49afc83..0551aaf 100644 --- a/WeakAuras/RegionTypes/RegionPrototype.lua +++ b/WeakAuras/RegionTypes/RegionPrototype.lua @@ -1151,6 +1151,15 @@ function Private.regionPrototype.AddExpandFunction(data, region, cloneId, parent end end +function Private.SetTextureOrSpellTexture(texture, path) + local spellID = tonumber(path) + if spellID then + return texture:SetTexture(select(3, GetSpellInfo(spellID)) or spellID) + else + return texture:SetTexture(path) + end +end + do local function move_condition_subregions(data, offset, afterPos) if data.conditions then diff --git a/WeakAurasOptions/RegionOptions/AuraBar.lua b/WeakAurasOptions/RegionOptions/AuraBar.lua index 60a7f5a..742fc24 100644 --- a/WeakAurasOptions/RegionOptions/AuraBar.lua +++ b/WeakAurasOptions/RegionOptions/AuraBar.lua @@ -663,7 +663,8 @@ local function modifyThumbnail(parent, borderframe, data, fullModify, width, hei iconPath = path or data.displayIcon end - icon:SetTexture(iconPath and iconPath ~= "" and iconPath or "Interface\\Icons\\INV_Misc_QuestionMark") + OptionsPrivate.Private.SetTextureOrSpellTexture(icon, + iconPath and iconPath ~= "" and iconPath or "Interface\\Icons\\INV_Misc_QuestionMark") end if data then diff --git a/WeakAurasOptions/RegionOptions/Empty.lua b/WeakAurasOptions/RegionOptions/Empty.lua index 1f17157..2bc0b1b 100644 --- a/WeakAurasOptions/RegionOptions/Empty.lua +++ b/WeakAurasOptions/RegionOptions/Empty.lua @@ -74,7 +74,7 @@ local function createThumbnail() end local function modifyThumbnail(parent, frame, data) - frame.icon:SetTexture(data.thumbnailIcon) + OptionsPrivate.Private.SetTextureOrSpellTexture(frame.icon, data.thumbnailIcon) if frame.icon:GetTexture() then frame.icon:Show() else diff --git a/WeakAurasOptions/RegionOptions/Icon.lua b/WeakAurasOptions/RegionOptions/Icon.lua index b523926..5ac2f5e 100644 --- a/WeakAurasOptions/RegionOptions/Icon.lua +++ b/WeakAurasOptions/RegionOptions/Icon.lua @@ -300,7 +300,8 @@ local function modifyThumbnail(parent, frame, data) iconPath = path or data.displayIcon end - self.icon:SetTexture(iconPath and iconPath ~= "" and iconPath or "Interface\\Icons\\INV_Misc_QuestionMark") + OptionsPrivate.Private.SetTextureOrSpellTexture(self.icon, + iconPath and iconPath ~= "" and iconPath or "Interface\\Icons\\INV_Misc_QuestionMark") end if data then