From 3ba51f5d107689775129680afa92387d25d3ffad Mon Sep 17 00:00:00 2001 From: muleyo Date: Sat, 14 Feb 2026 21:59:46 +0100 Subject: [PATCH 1/3] Added namespace option --- LibCustomGlow-1.0.lua | 439 ++++++++++++++++++++++-------------------- 1 file changed, 230 insertions(+), 209 deletions(-) diff --git a/LibCustomGlow-1.0.lua b/LibCustomGlow-1.0.lua index 115f7ca..1d749b5 100644 --- a/LibCustomGlow-1.0.lua +++ b/LibCustomGlow-1.0.lua @@ -1,16 +1,20 @@ --[[ This library contains work of Hendrick "nevcairiel" Leppkes https://www.wowace.com/projects/libbuttonglow-1-0 -]] - --- luacheck: globals CreateFromMixins ObjectPoolMixin CreateTexturePool CreateFramePool - +]] -- luacheck: globals CreateFromMixins ObjectPoolMixin CreateTexturePool CreateFramePool local MAJOR_VERSION = "LibCustomGlow-1.0" local MINOR_VERSION = 24 -if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end -local lib, oldversion = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION) -if not lib then return end -local Masque = LibStub("Masque", true) +local _, ns = ... +local lib +if ns.LCG then + lib = ns.LCG +else + lib = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION) + if not lib then + return + end +end +local Masque = LibStub and LibStub("Masque", true) local isRetail = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE local textureList = { @@ -22,10 +26,10 @@ local textureList = { local shineCoords = {0.3984375, 0.4453125, 0.40234375, 0.44921875} if isRetail then textureList.shine = [[Interface\Artifacts\Artifacts]] - shineCoords = {0.8115234375,0.9169921875,0.8798828125,0.9853515625} + shineCoords = {0.8115234375, 0.9169921875, 0.8798828125, 0.9853515625} end -function lib.RegisterTextures(texture,id) +function lib.RegisterTextures(texture, id) textureList[id] = texture end @@ -79,19 +83,19 @@ local GlowMaskPool = { } GlowMaskPool:Init(GlowParent) -local TexPoolResetter = function(pool,tex) +local TexPoolResetter = function(pool, tex) local maskNum = tex:GetNumMaskTextures() - for i = maskNum , 1, -1 do + for i = maskNum, 1, -1 do tex:RemoveMaskTexture(tex:GetMaskTexture(i)) end tex:Hide() tex:ClearAllPoints() end -local GlowTexPool = CreateTexturePool(GlowParent ,"ARTWORK",7,nil,TexPoolResetter) +local GlowTexPool = CreateTexturePool(GlowParent, "ARTWORK", 7, nil, TexPoolResetter) lib.GlowTexPool = GlowTexPool -local FramePoolResetter = function(framePool,frame) - frame:SetScript("OnUpdate",nil) +local FramePoolResetter = function(framePool, frame) + frame:SetScript("OnUpdate", nil) local parent = frame:GetParent() if parent[frame.name] then parent[frame.name] = nil @@ -106,7 +110,7 @@ local FramePoolResetter = function(framePool,frame) frame.bg = nil end if frame.masks then - for _,mask in pairs(frame.masks) do + for _, mask in pairs(frame.masks) do GlowMaskPool:Release(mask) end frame.masks = nil @@ -118,35 +122,35 @@ local FramePoolResetter = function(framePool,frame) frame:Hide() frame:ClearAllPoints() end -local GlowFramePool = CreateFramePool("Frame",GlowParent,nil,FramePoolResetter) +local GlowFramePool = CreateFramePool("Frame", GlowParent, nil, FramePoolResetter) lib.GlowFramePool = GlowFramePool -local function addFrameAndTex(r,color,name,key,N,xOffset,yOffset,texture,texCoord,desaturated,frameLevel) +local function addFrameAndTex(r, color, name, key, N, xOffset, yOffset, texture, texCoord, desaturated, frameLevel) key = key or "" - frameLevel = frameLevel or 8 - if not r[name..key] then - r[name..key] = GlowFramePool:Acquire() - r[name..key]:SetParent(r) - r[name..key].name = name..key - end - local f = r[name..key] - f:SetFrameLevel(r:GetFrameLevel()+frameLevel) - f:SetPoint("TOPLEFT",r,"TOPLEFT",-xOffset+0.05,yOffset+0.05) - f:SetPoint("BOTTOMRIGHT",r,"BOTTOMRIGHT",xOffset,-yOffset+0.05) + frameLevel = frameLevel or 8 + if not r[name .. key] then + r[name .. key] = GlowFramePool:Acquire() + r[name .. key]:SetParent(r) + r[name .. key].name = name .. key + end + local f = r[name .. key] + f:SetFrameLevel(r:GetFrameLevel() + frameLevel) + f:SetPoint("TOPLEFT", r, "TOPLEFT", -xOffset + 0.05, yOffset + 0.05) + f:SetPoint("BOTTOMRIGHT", r, "BOTTOMRIGHT", xOffset, -yOffset + 0.05) f:Show() if not f.textures then f.textures = {} end - for i=1,N do + for i = 1, N do if not f.textures[i] then f.textures[i] = GlowTexPool:Acquire() f.textures[i]:SetTexture(texture) - f.textures[i]:SetTexCoord(texCoord[1],texCoord[2],texCoord[3],texCoord[4]) + f.textures[i]:SetTexCoord(texCoord[1], texCoord[2], texCoord[3], texCoord[4]) f.textures[i]:SetDesaturated(desaturated) f.textures[i]:SetParent(f) - f.textures[i]:SetDrawLayer("ARTWORK",7) + f.textures[i]:SetDrawLayer("ARTWORK", 7) if not isRetail and name == "_AutoCastGlow" then f.textures[i]:SetBlendMode("ADD") end @@ -155,165 +159,168 @@ local function addFrameAndTex(r,color,name,key,N,xOffset,yOffset,texture,texCoor if type(color) == "table" and color.GetRGBA then f.textures[i]:SetVertexColor(color:GetRGBA()) else - f.textures[i]:SetVertexColor(color[1],color[2],color[3],color[4]) + f.textures[i]:SetVertexColor(color[1], color[2], color[3], color[4]) end f.textures[i]:Show() end - while #f.textures>N do + while #f.textures > N do GlowTexPool:Release(f.textures[#f.textures]) table.remove(f.textures) end end - ---Pixel Glow Functions-- -local pCalc1 = function(progress,s,th,p) +-- Pixel Glow Functions-- +local pCalc1 = function(progress, s, th, p) local c - if progress>p[3] or progress p[3] or progress < p[0] then c = 0 - elseif progress>p[2] then - c =s-th-(progress-p[2])/(p[3]-p[2])*(s-th) - elseif progress>p[1] then - c =s-th + elseif progress > p[2] then + c = s - th - (progress - p[2]) / (p[3] - p[2]) * (s - th) + elseif progress > p[1] then + c = s - th else - c = (progress-p[0])/(p[1]-p[0])*(s-th) + c = (progress - p[0]) / (p[1] - p[0]) * (s - th) end - return math.floor(c+0.5) + return math.floor(c + 0.5) end -local pCalc2 = function(progress,s,th,p) +local pCalc2 = function(progress, s, th, p) local c - if progress>p[3] then - c = s-th-(progress-p[3])/(p[0]+1-p[3])*(s-th) - elseif progress>p[2] then - c = s-th - elseif progress>p[1] then - c = (progress-p[1])/(p[2]-p[1])*(s-th) - elseif progress>p[0] then + if progress > p[3] then + c = s - th - (progress - p[3]) / (p[0] + 1 - p[3]) * (s - th) + elseif progress > p[2] then + c = s - th + elseif progress > p[1] then + c = (progress - p[1]) / (p[2] - p[1]) * (s - th) + elseif progress > p[0] then c = 0 else - c = s-th-(progress+1-p[3])/(p[0]+1-p[3])*(s-th) + c = s - th - (progress + 1 - p[3]) / (p[0] + 1 - p[3]) * (s - th) end - return math.floor(c+0.5) + return math.floor(c + 0.5) end -local pUpdate = function(self,elapsed) - self.timer = self.timer+elapsed/self.info.period - if self.timer>1 or self.timer <-1 then - self.timer = self.timer%1 +local pUpdate = function(self, elapsed) + self.timer = self.timer + elapsed / self.info.period + if self.timer > 1 or self.timer < -1 then + self.timer = self.timer % 1 end local progress = self.timer - local width,height = self:GetSize() + local width, height = self:GetSize() if width ~= self.info.width or height ~= self.info.height then - local perimeter = 2*(width+height) - if not (perimeter>0) then + local perimeter = 2 * (width + height) + if not (perimeter > 0) then return end self.info.width = width self.info.height = height self.info.pTLx = { - [0] = (height+self.info.length/2)/perimeter, - [1] = (height+width+self.info.length/2)/perimeter, - [2] = (2*height+width-self.info.length/2)/perimeter, - [3] = 1-self.info.length/2/perimeter + [0] = (height + self.info.length / 2) / perimeter, + [1] = (height + width + self.info.length / 2) / perimeter, + [2] = (2 * height + width - self.info.length / 2) / perimeter, + [3] = 1 - self.info.length / 2 / perimeter } - self.info.pTLy ={ - [0] = (height-self.info.length/2)/perimeter, - [1] = (height+width+self.info.length/2)/perimeter, - [2] = (height*2+width+self.info.length/2)/perimeter, - [3] = 1-self.info.length/2/perimeter + self.info.pTLy = { + [0] = (height - self.info.length / 2) / perimeter, + [1] = (height + width + self.info.length / 2) / perimeter, + [2] = (height * 2 + width + self.info.length / 2) / perimeter, + [3] = 1 - self.info.length / 2 / perimeter } - self.info.pBRx ={ - [0] = self.info.length/2/perimeter, - [1] = (height-self.info.length/2)/perimeter, - [2] = (height+width-self.info.length/2)/perimeter, - [3] = (height*2+width+self.info.length/2)/perimeter + self.info.pBRx = { + [0] = self.info.length / 2 / perimeter, + [1] = (height - self.info.length / 2) / perimeter, + [2] = (height + width - self.info.length / 2) / perimeter, + [3] = (height * 2 + width + self.info.length / 2) / perimeter } - self.info.pBRy ={ - [0] = self.info.length/2/perimeter, - [1] = (height+self.info.length/2)/perimeter, - [2] = (height+width-self.info.length/2)/perimeter, - [3] = (height*2+width-self.info.length/2)/perimeter + self.info.pBRy = { + [0] = self.info.length / 2 / perimeter, + [1] = (height + self.info.length / 2) / perimeter, + [2] = (height + width - self.info.length / 2) / perimeter, + [3] = (height * 2 + width - self.info.length / 2) / perimeter } end if self:IsShown() then if not (self.masks[1]:IsShown()) then self.masks[1]:Show() - self.masks[1]:SetPoint("TOPLEFT",self,"TOPLEFT",self.info.th,-self.info.th) - self.masks[1]:SetPoint("BOTTOMRIGHT",self,"BOTTOMRIGHT",-self.info.th,self.info.th) + self.masks[1]:SetPoint("TOPLEFT", self, "TOPLEFT", self.info.th, -self.info.th) + self.masks[1]:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -self.info.th, self.info.th) end - if self.masks[2] and not(self.masks[2]:IsShown()) then + if self.masks[2] and not (self.masks[2]:IsShown()) then self.masks[2]:Show() - self.masks[2]:SetPoint("TOPLEFT",self,"TOPLEFT",self.info.th+1,-self.info.th-1) - self.masks[2]:SetPoint("BOTTOMRIGHT",self,"BOTTOMRIGHT",-self.info.th-1,self.info.th+1) + self.masks[2]:SetPoint("TOPLEFT", self, "TOPLEFT", self.info.th + 1, -self.info.th - 1) + self.masks[2]:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -self.info.th - 1, self.info.th + 1) end - if self.bg and not(self.bg:IsShown()) then + if self.bg and not (self.bg:IsShown()) then self.bg:Show() end - for k,line in pairs(self.textures) do - line:SetPoint("TOPLEFT",self,"TOPLEFT",pCalc1((progress+self.info.step*(k-1))%1,width,self.info.th,self.info.pTLx),-pCalc2((progress+self.info.step*(k-1))%1,height,self.info.th,self.info.pTLy)) - line:SetPoint("BOTTOMRIGHT",self,"TOPLEFT",self.info.th+pCalc2((progress+self.info.step*(k-1))%1,width,self.info.th,self.info.pBRx),-height+pCalc1((progress+self.info.step*(k-1))%1,height,self.info.th,self.info.pBRy)) + for k, line in pairs(self.textures) do + line:SetPoint("TOPLEFT", self, "TOPLEFT", + pCalc1((progress + self.info.step * (k - 1)) % 1, width, self.info.th, self.info.pTLx), + -pCalc2((progress + self.info.step * (k - 1)) % 1, height, self.info.th, self.info.pTLy)) + line:SetPoint("BOTTOMRIGHT", self, "TOPLEFT", self.info.th + + pCalc2((progress + self.info.step * (k - 1)) % 1, width, self.info.th, self.info.pBRx), -height + + pCalc1((progress + self.info.step * (k - 1)) % 1, height, self.info.th, self.info.pBRy)) end end end -function lib.PixelGlow_Start(r,color,N,frequency,length,th,xOffset,yOffset,border,key,frameLevel) +function lib.PixelGlow_Start(r, color, N, frequency, length, th, xOffset, yOffset, border, key, frameLevel) if not r then return end if not color then - color = {0.95,0.95,0.32,1} + color = {0.95, 0.95, 0.32, 1} end - if not(N and N>0) then + if not (N and N > 0) then N = 8 end local period if frequency then - if not(frequency>0 or frequency<0) then + if not (frequency > 0 or frequency < 0) then period = 4 else - period = 1/frequency + period = 1 / frequency end else period = 4 end - local width,height = r:GetSize() - length = length or math.floor((width+height)*(2/N-0.1)) - length = min(length,min(width,height)) + local width, height = r:GetSize() + length = length or math.floor((width + height) * (2 / N - 0.1)) + length = min(length, min(width, height)) th = th or 1 xOffset = xOffset or 0 yOffset = yOffset or 0 key = key or "" - addFrameAndTex(r,color,"_PixelGlow",key,N,xOffset,yOffset,textureList.white,{0,1,0,1},nil,frameLevel) - local f = r["_PixelGlow"..key] + addFrameAndTex(r, color, "_PixelGlow", key, N, xOffset, yOffset, textureList.white, {0, 1, 0, 1}, nil, frameLevel) + local f = r["_PixelGlow" .. key] if not f.masks then f.masks = {} end if not f.masks[1] then f.masks[1] = GlowMaskPool:Acquire() - f.masks[1]:SetTexture(textureList.empty, "CLAMPTOWHITE","CLAMPTOWHITE") + f.masks[1]:SetTexture(textureList.empty, "CLAMPTOWHITE", "CLAMPTOWHITE") f.masks[1]:Show() end - f.masks[1]:SetPoint("TOPLEFT",f,"TOPLEFT",th,-th) - f.masks[1]:SetPoint("BOTTOMRIGHT",f,"BOTTOMRIGHT",-th,th) + f.masks[1]:SetPoint("TOPLEFT", f, "TOPLEFT", th, -th) + f.masks[1]:SetPoint("BOTTOMRIGHT", f, "BOTTOMRIGHT", -th, th) - if not(border==false) then + if not (border == false) then if not f.masks[2] then f.masks[2] = GlowMaskPool:Acquire() - f.masks[2]:SetTexture(textureList.empty, "CLAMPTOWHITE","CLAMPTOWHITE") + f.masks[2]:SetTexture(textureList.empty, "CLAMPTOWHITE", "CLAMPTOWHITE") end - f.masks[2]:SetPoint("TOPLEFT",f,"TOPLEFT",th+1,-th-1) - f.masks[2]:SetPoint("BOTTOMRIGHT",f,"BOTTOMRIGHT",-th-1,th+1) + f.masks[2]:SetPoint("TOPLEFT", f, "TOPLEFT", th + 1, -th - 1) + f.masks[2]:SetPoint("BOTTOMRIGHT", f, "BOTTOMRIGHT", -th - 1, th + 1) if not f.bg then f.bg = GlowTexPool:Acquire() - f.bg:SetColorTexture(0.1,0.1,0.1,0.8) + f.bg:SetColorTexture(0.1, 0.1, 0.1, 0.8) f.bg:SetParent(f) f.bg:SetAllPoints(f) - f.bg:SetDrawLayer("ARTWORK",6) + f.bg:SetDrawLayer("ARTWORK", 6) f.bg:AddMaskTexture(f.masks[2]) end else @@ -326,14 +333,14 @@ function lib.PixelGlow_Start(r,color,N,frequency,length,th,xOffset,yOffset,borde f.masks[2] = nil end end - for _,tex in pairs(f.textures) do + for _, tex in pairs(f.textures) do if tex:GetNumMaskTextures() < 1 then tex:AddMaskTexture(f.masks[1]) end end f.timer = f.timer or 0 f.info = f.info or {} - f.info.step = 1/N + f.info.step = 1 / N f.info.period = period f.info.th = th if f.info.length ~= length then @@ -341,18 +348,18 @@ function lib.PixelGlow_Start(r,color,N,frequency,length,th,xOffset,yOffset,borde f.info.length = length end pUpdate(f, 0) - f:SetScript("OnUpdate",pUpdate) + f:SetScript("OnUpdate", pUpdate) end -function lib.PixelGlow_Stop(r,key) +function lib.PixelGlow_Stop(r, key) if not r then return end key = key or "" - if not r["_PixelGlow"..key] then + if not r["_PixelGlow" .. key] then return false else - GlowFramePool:Release(r["_PixelGlow"..key]) + GlowFramePool:Release(r["_PixelGlow" .. key]) end end @@ -360,61 +367,62 @@ table.insert(lib.glowList, "Pixel Glow") lib.startList["Pixel Glow"] = lib.PixelGlow_Start lib.stopList["Pixel Glow"] = lib.PixelGlow_Stop - ---Autocast Glow Functions-- -local function acUpdate(self,elapsed) - local width,height = self:GetSize() +-- Autocast Glow Functions-- +local function acUpdate(self, elapsed) + local width, height = self:GetSize() if width ~= self.info.width or height ~= self.info.height then - if width*height == 0 then return end -- Avoid division by zero + if width * height == 0 then + return + end -- Avoid division by zero self.info.width = width self.info.height = height - self.info.perimeter = 2*(width+height) - self.info.bottomlim = height*2+width - self.info.rightlim = height+width - self.info.space = self.info.perimeter/self.info.N + self.info.perimeter = 2 * (width + height) + self.info.bottomlim = height * 2 + width + self.info.rightlim = height + width + self.info.space = self.info.perimeter / self.info.N end local texIndex = 0; - for k=1,4 do - self.timer[k] = self.timer[k]+elapsed/(self.info.period*k) - if self.timer[k] > 1 or self.timer[k] <-1 then - self.timer[k] = self.timer[k]%1 + for k = 1, 4 do + self.timer[k] = self.timer[k] + elapsed / (self.info.period * k) + if self.timer[k] > 1 or self.timer[k] < -1 then + self.timer[k] = self.timer[k] % 1 end - for i = 1,self.info.N do - texIndex = texIndex+1 - local position = (self.info.space*i+self.info.perimeter*self.timer[k])%self.info.perimeter - if position>self.info.bottomlim then - self.textures[texIndex]: SetPoint("CENTER",self,"BOTTOMRIGHT",-position+self.info.bottomlim,0) - elseif position>self.info.rightlim then - self.textures[texIndex]: SetPoint("CENTER",self,"TOPRIGHT",0,-position+self.info.rightlim) - elseif position>self.info.height then - self.textures[texIndex]: SetPoint("CENTER",self,"TOPLEFT",position-self.info.height,0) + for i = 1, self.info.N do + texIndex = texIndex + 1 + local position = (self.info.space * i + self.info.perimeter * self.timer[k]) % self.info.perimeter + if position > self.info.bottomlim then + self.textures[texIndex]:SetPoint("CENTER", self, "BOTTOMRIGHT", -position + self.info.bottomlim, 0) + elseif position > self.info.rightlim then + self.textures[texIndex]:SetPoint("CENTER", self, "TOPRIGHT", 0, -position + self.info.rightlim) + elseif position > self.info.height then + self.textures[texIndex]:SetPoint("CENTER", self, "TOPLEFT", position - self.info.height, 0) else - self.textures[texIndex]: SetPoint("CENTER",self,"BOTTOMLEFT",0,position) + self.textures[texIndex]:SetPoint("CENTER", self, "BOTTOMLEFT", 0, position) end end end end -function lib.AutoCastGlow_Start(r,color,N,frequency,scale,xOffset,yOffset,key,frameLevel) +function lib.AutoCastGlow_Start(r, color, N, frequency, scale, xOffset, yOffset, key, frameLevel) if not r then return end if not color then - color = {0.95,0.95,0.32,1} + color = {0.95, 0.95, 0.32, 1} end - if not(N and N>0) then + if not (N and N > 0) then N = 4 end local period if frequency then - if not(frequency>0 or frequency<0) then + if not (frequency > 0 or frequency < 0) then period = 8 else - period = 1/frequency + period = 1 / frequency end else period = 8 @@ -424,32 +432,33 @@ function lib.AutoCastGlow_Start(r,color,N,frequency,scale,xOffset,yOffset,key,fr yOffset = yOffset or 0 key = key or "" - addFrameAndTex(r,color,"_AutoCastGlow",key,N*4,xOffset,yOffset,textureList.shine,shineCoords, true, frameLevel) - local f = r["_AutoCastGlow"..key] - local sizes = {7,6,5,4} - for k,size in pairs(sizes) do - for i = 1,N do - f.textures[i+N*(k-1)]:SetSize(size*scale,size*scale) + addFrameAndTex(r, color, "_AutoCastGlow", key, N * 4, xOffset, yOffset, textureList.shine, shineCoords, true, + frameLevel) + local f = r["_AutoCastGlow" .. key] + local sizes = {7, 6, 5, 4} + for k, size in pairs(sizes) do + for i = 1, N do + f.textures[i + N * (k - 1)]:SetSize(size * scale, size * scale) end end - f.timer = f.timer or {0,0,0,0} + f.timer = f.timer or {0, 0, 0, 0} f.info = f.info or {} f.info.N = N f.info.period = period - f:SetScript("OnUpdate",acUpdate) + f:SetScript("OnUpdate", acUpdate) acUpdate(f, 0) end -function lib.AutoCastGlow_Stop(r,key) +function lib.AutoCastGlow_Stop(r, key) if not r then return end key = key or "" - if not r["_AutoCastGlow"..key] then + if not r["_AutoCastGlow" .. key] then return false else - GlowFramePool:Release(r["_AutoCastGlow"..key]) + GlowFramePool:Release(r["_AutoCastGlow" .. key]) end end @@ -457,9 +466,9 @@ table.insert(lib.glowList, "Autocast Shine") lib.startList["Autocast Shine"] = lib.AutoCastGlow_Start lib.stopList["Autocast Shine"] = lib.AutoCastGlow_Stop ---Action Button Glow-- -local function ButtonGlowResetter(framePool,frame) - frame:SetScript("OnUpdate",nil) +-- Action Button Glow-- +local function ButtonGlowResetter(framePool, frame) + frame:SetScript("OnUpdate", nil) local parent = frame:GetParent() if parent._ButtonGlow then parent._ButtonGlow = nil @@ -467,7 +476,7 @@ local function ButtonGlowResetter(framePool,frame) frame:Hide() frame:ClearAllPoints() end -local ButtonGlowPool = CreateFramePool("Frame",GlowParent,nil,ButtonGlowResetter) +local ButtonGlowPool = CreateFramePool("Frame", GlowParent, nil, ButtonGlowResetter) lib.ButtonGlowPool = ButtonGlowPool local function CreateScaleAnim(group, target, order, duration, x, y, delay) @@ -503,13 +512,13 @@ local function AnimIn_OnPlay(group) local frame = group:GetParent() local frameWidth, frameHeight = frame:GetSize() frame.spark:SetSize(frameWidth, frameHeight) - frame.spark:SetAlpha(not(frame.color) and 1.0 or 0.3*frame.color[4]) + frame.spark:SetAlpha(not (frame.color) and 1.0 or 0.3 * frame.color[4]) frame.innerGlow:SetSize(frameWidth / 2, frameHeight / 2) - frame.innerGlow:SetAlpha(not(frame.color) and 1.0 or frame.color[4]) - frame.innerGlowOver:SetAlpha(not(frame.color) and 1.0 or frame.color[4]) + frame.innerGlow:SetAlpha(not (frame.color) and 1.0 or frame.color[4]) + frame.innerGlowOver:SetAlpha(not (frame.color) and 1.0 or frame.color[4]) frame.outerGlow:SetSize(frameWidth * 2, frameHeight * 2) - frame.outerGlow:SetAlpha(not(frame.color) and 1.0 or frame.color[4]) - frame.outerGlowOver:SetAlpha(not(frame.color) and 1.0 or frame.color[4]) + frame.outerGlow:SetAlpha(not (frame.color) and 1.0 or frame.color[4]) + frame.outerGlowOver:SetAlpha(not (frame.color) and 1.0 or frame.color[4]) frame.ants:SetSize(frameWidth * 0.85, frameHeight * 0.85) frame.ants:SetAlpha(0) frame:Show() @@ -525,7 +534,7 @@ local function AnimIn_OnFinished(group) frame.outerGlow:SetSize(frameWidth, frameHeight) frame.outerGlowOver:SetAlpha(0.0) frame.outerGlowOver:SetSize(frameWidth, frameHeight) - frame.ants:SetAlpha(not(frame.color) and 1.0 or frame.color[4]) + frame.ants:SetAlpha(not (frame.color) and 1.0 or frame.color[4]) end local function AnimIn_OnStop(group) @@ -548,14 +557,14 @@ local function bgUpdate(self, elapsed) AnimateTexCoords(self.ants, 256, 256, 48, 48, 22, elapsed, self.throttle); local cooldown = self:GetParent().cooldown; local duration = cooldown and cooldown:IsShown() and cooldown:GetCooldownDuration() - if((not issecretvalue or not issecretvalue(duration)) and duration and duration > 3000) then + if ((not issecretvalue or not issecretvalue(duration)) and duration and duration > 3000) then self:SetAlpha(0.5); else self:SetAlpha(1.0); end end -local function configureButtonGlow(f,alpha) +local function configureButtonGlow(f, alpha) f.spark = f:CreateTexture(nil, "BACKGROUND") f.spark:SetPoint("CENTER") f.spark:SetAlpha(0) @@ -601,18 +610,18 @@ local function configureButtonGlow(f,alpha) f.animIn = f:CreateAnimationGroup() f.animIn.appear = {} f.animIn.fade = {} - CreateScaleAnim(f.animIn, "spark", 1, 0.2, 1.5, 1.5) - CreateAlphaAnim(f.animIn, "spark", 1, 0.2, 0, alpha, nil, true) - CreateScaleAnim(f.animIn, "innerGlow", 1, 0.3, 2, 2) - CreateScaleAnim(f.animIn, "innerGlowOver", 1, 0.3, 2, 2) - CreateAlphaAnim(f.animIn, "innerGlowOver", 1, 0.3, alpha, 0, nil, false) - CreateScaleAnim(f.animIn, "outerGlow", 1, 0.3, 0.5, 0.5) - CreateScaleAnim(f.animIn, "outerGlowOver", 1, 0.3, 0.5, 0.5) - CreateAlphaAnim(f.animIn, "outerGlowOver", 1, 0.3, alpha, 0, nil, false) - CreateScaleAnim(f.animIn, "spark", 1, 0.2, 2/3, 2/3, 0.2) - CreateAlphaAnim(f.animIn, "spark", 1, 0.2, alpha, 0, 0.2, false) - CreateAlphaAnim(f.animIn, "innerGlow", 1, 0.2, alpha, 0, 0.3, false) - CreateAlphaAnim(f.animIn, "ants", 1, 0.2, 0, alpha, 0.3, true) + CreateScaleAnim(f.animIn, "spark", 1, 0.2, 1.5, 1.5) + CreateAlphaAnim(f.animIn, "spark", 1, 0.2, 0, alpha, nil, true) + CreateScaleAnim(f.animIn, "innerGlow", 1, 0.3, 2, 2) + CreateScaleAnim(f.animIn, "innerGlowOver", 1, 0.3, 2, 2) + CreateAlphaAnim(f.animIn, "innerGlowOver", 1, 0.3, alpha, 0, nil, false) + CreateScaleAnim(f.animIn, "outerGlow", 1, 0.3, 0.5, 0.5) + CreateScaleAnim(f.animIn, "outerGlowOver", 1, 0.3, 0.5, 0.5) + CreateAlphaAnim(f.animIn, "outerGlowOver", 1, 0.3, alpha, 0, nil, false) + CreateScaleAnim(f.animIn, "spark", 1, 0.2, 2 / 3, 2 / 3, 0.2) + CreateAlphaAnim(f.animIn, "spark", 1, 0.2, alpha, 0, 0.2, false) + CreateAlphaAnim(f.animIn, "innerGlow", 1, 0.2, alpha, 0, 0.3, false) + CreateAlphaAnim(f.animIn, "ants", 1, 0.2, 0, alpha, 0.3, true) f.animIn:SetScript("OnPlay", AnimIn_OnPlay) f.animIn:SetScript("OnStop", AnimIn_OnStop) f.animIn:SetScript("OnFinished", AnimIn_OnFinished) @@ -621,30 +630,39 @@ local function configureButtonGlow(f,alpha) f.animOut.appear = {} f.animOut.fade = {} CreateAlphaAnim(f.animOut, "outerGlowOver", 1, 0.2, 0, alpha, nil, true) - CreateAlphaAnim(f.animOut, "ants", 1, 0.2, alpha, 0, nil, false) + CreateAlphaAnim(f.animOut, "ants", 1, 0.2, alpha, 0, nil, false) CreateAlphaAnim(f.animOut, "outerGlowOver", 2, 0.2, alpha, 0, nil, false) - CreateAlphaAnim(f.animOut, "outerGlow", 2, 0.2, alpha, 0, nil, false) - f.animOut:SetScript("OnFinished", function(self) ButtonGlowPool:Release(self:GetParent()) end) + CreateAlphaAnim(f.animOut, "outerGlow", 2, 0.2, alpha, 0, nil, false) + f.animOut:SetScript("OnFinished", function(self) + ButtonGlowPool:Release(self:GetParent()) + end) f:SetScript("OnHide", bgHide) end -local function updateAlphaAnim(f,alpha) - for _,anim in pairs(f.animIn.appear) do +local function updateAlphaAnim(f, alpha) + for _, anim in pairs(f.animIn.appear) do anim:SetToAlpha(alpha) end - for _,anim in pairs(f.animIn.fade) do + for _, anim in pairs(f.animIn.fade) do anim:SetFromAlpha(alpha) end - for _,anim in pairs(f.animOut.appear) do + for _, anim in pairs(f.animOut.appear) do anim:SetToAlpha(alpha) end - for _,anim in pairs(f.animOut.fade) do + for _, anim in pairs(f.animOut.fade) do anim:SetFromAlpha(alpha) end end -local ButtonGlowTextures = {["spark"] = true,["innerGlow"] = true,["innerGlowOver"] = true,["outerGlow"] = true,["outerGlowOver"] = true,["ants"] = true} +local ButtonGlowTextures = { + ["spark"] = true, + ["innerGlow"] = true, + ["innerGlowOver"] = true, + ["outerGlow"] = true, + ["outerGlowOver"] = true, + ["ants"] = true +} local function noZero(num) if num == 0 then @@ -654,36 +672,36 @@ local function noZero(num) end end -function lib.ButtonGlow_Start(r,color,frequency,frameLevel) +function lib.ButtonGlow_Start(r, color, frequency, frameLevel) if not r then return end - frameLevel = frameLevel or 8; + frameLevel = frameLevel or 8; local throttle if frequency and frequency > 0 then - throttle = 0.25/frequency*0.01 + throttle = 0.25 / frequency * 0.01 else throttle = 0.01 end if r._ButtonGlow then local f = r._ButtonGlow - local width,height = r:GetSize() - f:SetFrameLevel(r:GetFrameLevel()+frameLevel) - f:SetSize(width*1.4 , height*1.4) + local width, height = r:GetSize() + f:SetFrameLevel(r:GetFrameLevel() + frameLevel) + f:SetSize(width * 1.4, height * 1.4) f:SetPoint("TOPLEFT", r, "TOPLEFT", -width * 0.2, height * 0.2) f:SetPoint("BOTTOMRIGHT", r, "BOTTOMRIGHT", width * 0.2, -height * 0.2) - f.ants:SetSize(width*1.4*0.85, height*1.4*0.85) - AnimIn_OnFinished(f.animIn) - if f.animOut:IsPlaying() then + f.ants:SetSize(width * 1.4 * 0.85, height * 1.4 * 0.85) + AnimIn_OnFinished(f.animIn) + if f.animOut:IsPlaying() then f.animOut:Stop() f.animIn:Play() end - if not(color) then + if not (color) then for texture in pairs(ButtonGlowTextures) do f[texture]:SetDesaturated(nil) - f[texture]:SetVertexColor(1,1,1) - local alpha = math.min(f[texture]:GetAlpha()/noZero(f.color and f.color[4] or 1), 1) + f[texture]:SetVertexColor(1, 1, 1) + local alpha = math.min(f[texture]:GetAlpha() / noZero(f.color and f.color[4] or 1), 1) f[texture]:SetAlpha(alpha) updateAlphaAnim(f, 1) end @@ -695,11 +713,11 @@ function lib.ButtonGlow_Start(r,color,frequency,frameLevel) local r, g, b = color:GetRGBA() f[texture]:SetVertexColor(r, g, b) else - f[texture]:SetVertexColor(color[1],color[2],color[3]) + f[texture]:SetVertexColor(color[1], color[2], color[3]) end - local alpha = math.min(f[texture]:GetAlpha()/noZero(f.color and f.color[4] or 1)*color[4], 1) + local alpha = math.min(f[texture]:GetAlpha() / noZero(f.color and f.color[4] or 1) * color[4], 1) f[texture]:SetAlpha(alpha) - updateAlphaAnim(f,color and color[4] or 1) + updateAlphaAnim(f, color and color[4] or 1) end f.color = color end @@ -707,22 +725,22 @@ function lib.ButtonGlow_Start(r,color,frequency,frameLevel) else local f, new = ButtonGlowPool:Acquire() if new then - configureButtonGlow(f,color and color[4] or 1) + configureButtonGlow(f, color and color[4] or 1) else - updateAlphaAnim(f,color and color[4] or 1) + updateAlphaAnim(f, color and color[4] or 1) end r._ButtonGlow = f - local width,height = r:GetSize() + local width, height = r:GetSize() f:SetParent(r) - f:SetFrameLevel(r:GetFrameLevel()+frameLevel) + f:SetFrameLevel(r:GetFrameLevel() + frameLevel) f:SetSize(width * 1.4, height * 1.4) f:SetPoint("TOPLEFT", r, "TOPLEFT", -width * 0.2, height * 0.2) f:SetPoint("BOTTOMRIGHT", r, "BOTTOMRIGHT", width * 0.2, -height * 0.2) - if not(color) then + if not (color) then f.color = false for texture in pairs(ButtonGlowTextures) do f[texture]:SetDesaturated(nil) - f[texture]:SetVertexColor(1,1,1) + f[texture]:SetVertexColor(1, 1, 1) end else f.color = color @@ -732,7 +750,7 @@ function lib.ButtonGlow_Start(r,color,frequency,frameLevel) local r, g, b = color:GetRGBA() f[texture]:SetVertexColor(r, g, b) else - f[texture]:SetVertexColor(color[1],color[2],color[3]) + f[texture]:SetVertexColor(color[1], color[2], color[3]) end end end @@ -766,7 +784,6 @@ table.insert(lib.glowList, "Action Button Glow") lib.startList["Action Button Glow"] = lib.ButtonGlow_Start lib.stopList["Action Button Glow"] = lib.ButtonGlow_Stop - -- ProcGlow local function ProcGlowResetter(framePool, frame) @@ -917,7 +934,9 @@ function lib.ProcGlow_Start(r, options) return end options = options or {} - setmetatable(options, { __index = ProcGlowDefaults }) + setmetatable(options, { + __index = ProcGlowDefaults + }) local key = "_ProcGlow" .. options.key local f, new if r[key] then @@ -953,3 +972,5 @@ end table.insert(lib.glowList, "Proc Glow") lib.startList["Proc Glow"] = lib.ProcGlow_Start lib.stopList["Proc Glow"] = lib.ProcGlow_Stop + +ns.LCG = lib From fd88c3d37d964182162ce495942b4f91706c53f6 Mon Sep 17 00:00:00 2001 From: muleyo Date: Sat, 14 Feb 2026 22:16:18 +0100 Subject: [PATCH 2/3] Revert formattings --- LibCustomGlow-1.0.lua | 431 ++++++++++++++++++++---------------------- 1 file changed, 210 insertions(+), 221 deletions(-) diff --git a/LibCustomGlow-1.0.lua b/LibCustomGlow-1.0.lua index 1d749b5..5e0d423 100644 --- a/LibCustomGlow-1.0.lua +++ b/LibCustomGlow-1.0.lua @@ -1,7 +1,10 @@ --[[ This library contains work of Hendrick "nevcairiel" Leppkes https://www.wowace.com/projects/libbuttonglow-1-0 -]] -- luacheck: globals CreateFromMixins ObjectPoolMixin CreateTexturePool CreateFramePool +]] + +-- luacheck: globals CreateFromMixins ObjectPoolMixin CreateTexturePool CreateFramePool + local MAJOR_VERSION = "LibCustomGlow-1.0" local MINOR_VERSION = 24 local _, ns = ... @@ -10,11 +13,12 @@ if ns.LCG then lib = ns.LCG else lib = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION) - if not lib then - return - end + if not lib then return end end -local Masque = LibStub and LibStub("Masque", true) +if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end +local lib, oldversion = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION) +if not lib then return end +local Masque = LibStub("Masque", true) local isRetail = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE local textureList = { @@ -26,10 +30,10 @@ local textureList = { local shineCoords = {0.3984375, 0.4453125, 0.40234375, 0.44921875} if isRetail then textureList.shine = [[Interface\Artifacts\Artifacts]] - shineCoords = {0.8115234375, 0.9169921875, 0.8798828125, 0.9853515625} + shineCoords = {0.8115234375,0.9169921875,0.8798828125,0.9853515625} end -function lib.RegisterTextures(texture, id) +function lib.RegisterTextures(texture,id) textureList[id] = texture end @@ -83,19 +87,19 @@ local GlowMaskPool = { } GlowMaskPool:Init(GlowParent) -local TexPoolResetter = function(pool, tex) +local TexPoolResetter = function(pool,tex) local maskNum = tex:GetNumMaskTextures() - for i = maskNum, 1, -1 do + for i = maskNum , 1, -1 do tex:RemoveMaskTexture(tex:GetMaskTexture(i)) end tex:Hide() tex:ClearAllPoints() end -local GlowTexPool = CreateTexturePool(GlowParent, "ARTWORK", 7, nil, TexPoolResetter) +local GlowTexPool = CreateTexturePool(GlowParent ,"ARTWORK",7,nil,TexPoolResetter) lib.GlowTexPool = GlowTexPool -local FramePoolResetter = function(framePool, frame) - frame:SetScript("OnUpdate", nil) +local FramePoolResetter = function(framePool,frame) + frame:SetScript("OnUpdate",nil) local parent = frame:GetParent() if parent[frame.name] then parent[frame.name] = nil @@ -110,7 +114,7 @@ local FramePoolResetter = function(framePool, frame) frame.bg = nil end if frame.masks then - for _, mask in pairs(frame.masks) do + for _,mask in pairs(frame.masks) do GlowMaskPool:Release(mask) end frame.masks = nil @@ -122,35 +126,35 @@ local FramePoolResetter = function(framePool, frame) frame:Hide() frame:ClearAllPoints() end -local GlowFramePool = CreateFramePool("Frame", GlowParent, nil, FramePoolResetter) +local GlowFramePool = CreateFramePool("Frame",GlowParent,nil,FramePoolResetter) lib.GlowFramePool = GlowFramePool -local function addFrameAndTex(r, color, name, key, N, xOffset, yOffset, texture, texCoord, desaturated, frameLevel) +local function addFrameAndTex(r,color,name,key,N,xOffset,yOffset,texture,texCoord,desaturated,frameLevel) key = key or "" - frameLevel = frameLevel or 8 - if not r[name .. key] then - r[name .. key] = GlowFramePool:Acquire() - r[name .. key]:SetParent(r) - r[name .. key].name = name .. key - end - local f = r[name .. key] - f:SetFrameLevel(r:GetFrameLevel() + frameLevel) - f:SetPoint("TOPLEFT", r, "TOPLEFT", -xOffset + 0.05, yOffset + 0.05) - f:SetPoint("BOTTOMRIGHT", r, "BOTTOMRIGHT", xOffset, -yOffset + 0.05) + frameLevel = frameLevel or 8 + if not r[name..key] then + r[name..key] = GlowFramePool:Acquire() + r[name..key]:SetParent(r) + r[name..key].name = name..key + end + local f = r[name..key] + f:SetFrameLevel(r:GetFrameLevel()+frameLevel) + f:SetPoint("TOPLEFT",r,"TOPLEFT",-xOffset+0.05,yOffset+0.05) + f:SetPoint("BOTTOMRIGHT",r,"BOTTOMRIGHT",xOffset,-yOffset+0.05) f:Show() if not f.textures then f.textures = {} end - for i = 1, N do + for i=1,N do if not f.textures[i] then f.textures[i] = GlowTexPool:Acquire() f.textures[i]:SetTexture(texture) - f.textures[i]:SetTexCoord(texCoord[1], texCoord[2], texCoord[3], texCoord[4]) + f.textures[i]:SetTexCoord(texCoord[1],texCoord[2],texCoord[3],texCoord[4]) f.textures[i]:SetDesaturated(desaturated) f.textures[i]:SetParent(f) - f.textures[i]:SetDrawLayer("ARTWORK", 7) + f.textures[i]:SetDrawLayer("ARTWORK",7) if not isRetail and name == "_AutoCastGlow" then f.textures[i]:SetBlendMode("ADD") end @@ -159,168 +163,165 @@ local function addFrameAndTex(r, color, name, key, N, xOffset, yOffset, texture, if type(color) == "table" and color.GetRGBA then f.textures[i]:SetVertexColor(color:GetRGBA()) else - f.textures[i]:SetVertexColor(color[1], color[2], color[3], color[4]) + f.textures[i]:SetVertexColor(color[1],color[2],color[3],color[4]) end f.textures[i]:Show() end - while #f.textures > N do + while #f.textures>N do GlowTexPool:Release(f.textures[#f.textures]) table.remove(f.textures) end end --- Pixel Glow Functions-- -local pCalc1 = function(progress, s, th, p) + +--Pixel Glow Functions-- +local pCalc1 = function(progress,s,th,p) local c - if progress > p[3] or progress < p[0] then + if progress>p[3] or progress p[2] then - c = s - th - (progress - p[2]) / (p[3] - p[2]) * (s - th) - elseif progress > p[1] then - c = s - th + elseif progress>p[2] then + c =s-th-(progress-p[2])/(p[3]-p[2])*(s-th) + elseif progress>p[1] then + c =s-th else - c = (progress - p[0]) / (p[1] - p[0]) * (s - th) + c = (progress-p[0])/(p[1]-p[0])*(s-th) end - return math.floor(c + 0.5) + return math.floor(c+0.5) end -local pCalc2 = function(progress, s, th, p) +local pCalc2 = function(progress,s,th,p) local c - if progress > p[3] then - c = s - th - (progress - p[3]) / (p[0] + 1 - p[3]) * (s - th) - elseif progress > p[2] then - c = s - th - elseif progress > p[1] then - c = (progress - p[1]) / (p[2] - p[1]) * (s - th) - elseif progress > p[0] then + if progress>p[3] then + c = s-th-(progress-p[3])/(p[0]+1-p[3])*(s-th) + elseif progress>p[2] then + c = s-th + elseif progress>p[1] then + c = (progress-p[1])/(p[2]-p[1])*(s-th) + elseif progress>p[0] then c = 0 else - c = s - th - (progress + 1 - p[3]) / (p[0] + 1 - p[3]) * (s - th) + c = s-th-(progress+1-p[3])/(p[0]+1-p[3])*(s-th) end - return math.floor(c + 0.5) + return math.floor(c+0.5) end -local pUpdate = function(self, elapsed) - self.timer = self.timer + elapsed / self.info.period - if self.timer > 1 or self.timer < -1 then - self.timer = self.timer % 1 +local pUpdate = function(self,elapsed) + self.timer = self.timer+elapsed/self.info.period + if self.timer>1 or self.timer <-1 then + self.timer = self.timer%1 end local progress = self.timer - local width, height = self:GetSize() + local width,height = self:GetSize() if width ~= self.info.width or height ~= self.info.height then - local perimeter = 2 * (width + height) - if not (perimeter > 0) then + local perimeter = 2*(width+height) + if not (perimeter>0) then return end self.info.width = width self.info.height = height self.info.pTLx = { - [0] = (height + self.info.length / 2) / perimeter, - [1] = (height + width + self.info.length / 2) / perimeter, - [2] = (2 * height + width - self.info.length / 2) / perimeter, - [3] = 1 - self.info.length / 2 / perimeter + [0] = (height+self.info.length/2)/perimeter, + [1] = (height+width+self.info.length/2)/perimeter, + [2] = (2*height+width-self.info.length/2)/perimeter, + [3] = 1-self.info.length/2/perimeter } - self.info.pTLy = { - [0] = (height - self.info.length / 2) / perimeter, - [1] = (height + width + self.info.length / 2) / perimeter, - [2] = (height * 2 + width + self.info.length / 2) / perimeter, - [3] = 1 - self.info.length / 2 / perimeter + self.info.pTLy ={ + [0] = (height-self.info.length/2)/perimeter, + [1] = (height+width+self.info.length/2)/perimeter, + [2] = (height*2+width+self.info.length/2)/perimeter, + [3] = 1-self.info.length/2/perimeter } - self.info.pBRx = { - [0] = self.info.length / 2 / perimeter, - [1] = (height - self.info.length / 2) / perimeter, - [2] = (height + width - self.info.length / 2) / perimeter, - [3] = (height * 2 + width + self.info.length / 2) / perimeter + self.info.pBRx ={ + [0] = self.info.length/2/perimeter, + [1] = (height-self.info.length/2)/perimeter, + [2] = (height+width-self.info.length/2)/perimeter, + [3] = (height*2+width+self.info.length/2)/perimeter } - self.info.pBRy = { - [0] = self.info.length / 2 / perimeter, - [1] = (height + self.info.length / 2) / perimeter, - [2] = (height + width - self.info.length / 2) / perimeter, - [3] = (height * 2 + width - self.info.length / 2) / perimeter + self.info.pBRy ={ + [0] = self.info.length/2/perimeter, + [1] = (height+self.info.length/2)/perimeter, + [2] = (height+width-self.info.length/2)/perimeter, + [3] = (height*2+width-self.info.length/2)/perimeter } end if self:IsShown() then if not (self.masks[1]:IsShown()) then self.masks[1]:Show() - self.masks[1]:SetPoint("TOPLEFT", self, "TOPLEFT", self.info.th, -self.info.th) - self.masks[1]:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -self.info.th, self.info.th) + self.masks[1]:SetPoint("TOPLEFT",self,"TOPLEFT",self.info.th,-self.info.th) + self.masks[1]:SetPoint("BOTTOMRIGHT",self,"BOTTOMRIGHT",-self.info.th,self.info.th) end - if self.masks[2] and not (self.masks[2]:IsShown()) then + if self.masks[2] and not(self.masks[2]:IsShown()) then self.masks[2]:Show() - self.masks[2]:SetPoint("TOPLEFT", self, "TOPLEFT", self.info.th + 1, -self.info.th - 1) - self.masks[2]:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -self.info.th - 1, self.info.th + 1) + self.masks[2]:SetPoint("TOPLEFT",self,"TOPLEFT",self.info.th+1,-self.info.th-1) + self.masks[2]:SetPoint("BOTTOMRIGHT",self,"BOTTOMRIGHT",-self.info.th-1,self.info.th+1) end - if self.bg and not (self.bg:IsShown()) then + if self.bg and not(self.bg:IsShown()) then self.bg:Show() end - for k, line in pairs(self.textures) do - line:SetPoint("TOPLEFT", self, "TOPLEFT", - pCalc1((progress + self.info.step * (k - 1)) % 1, width, self.info.th, self.info.pTLx), - -pCalc2((progress + self.info.step * (k - 1)) % 1, height, self.info.th, self.info.pTLy)) - line:SetPoint("BOTTOMRIGHT", self, "TOPLEFT", self.info.th + - pCalc2((progress + self.info.step * (k - 1)) % 1, width, self.info.th, self.info.pBRx), -height + - pCalc1((progress + self.info.step * (k - 1)) % 1, height, self.info.th, self.info.pBRy)) + for k,line in pairs(self.textures) do + line:SetPoint("TOPLEFT",self,"TOPLEFT",pCalc1((progress+self.info.step*(k-1))%1,width,self.info.th,self.info.pTLx),-pCalc2((progress+self.info.step*(k-1))%1,height,self.info.th,self.info.pTLy)) + line:SetPoint("BOTTOMRIGHT",self,"TOPLEFT",self.info.th+pCalc2((progress+self.info.step*(k-1))%1,width,self.info.th,self.info.pBRx),-height+pCalc1((progress+self.info.step*(k-1))%1,height,self.info.th,self.info.pBRy)) end end end -function lib.PixelGlow_Start(r, color, N, frequency, length, th, xOffset, yOffset, border, key, frameLevel) +function lib.PixelGlow_Start(r,color,N,frequency,length,th,xOffset,yOffset,border,key,frameLevel) if not r then return end if not color then - color = {0.95, 0.95, 0.32, 1} + color = {0.95,0.95,0.32,1} end - if not (N and N > 0) then + if not(N and N>0) then N = 8 end local period if frequency then - if not (frequency > 0 or frequency < 0) then + if not(frequency>0 or frequency<0) then period = 4 else - period = 1 / frequency + period = 1/frequency end else period = 4 end - local width, height = r:GetSize() - length = length or math.floor((width + height) * (2 / N - 0.1)) - length = min(length, min(width, height)) + local width,height = r:GetSize() + length = length or math.floor((width+height)*(2/N-0.1)) + length = min(length,min(width,height)) th = th or 1 xOffset = xOffset or 0 yOffset = yOffset or 0 key = key or "" - addFrameAndTex(r, color, "_PixelGlow", key, N, xOffset, yOffset, textureList.white, {0, 1, 0, 1}, nil, frameLevel) - local f = r["_PixelGlow" .. key] + addFrameAndTex(r,color,"_PixelGlow",key,N,xOffset,yOffset,textureList.white,{0,1,0,1},nil,frameLevel) + local f = r["_PixelGlow"..key] if not f.masks then f.masks = {} end if not f.masks[1] then f.masks[1] = GlowMaskPool:Acquire() - f.masks[1]:SetTexture(textureList.empty, "CLAMPTOWHITE", "CLAMPTOWHITE") + f.masks[1]:SetTexture(textureList.empty, "CLAMPTOWHITE","CLAMPTOWHITE") f.masks[1]:Show() end - f.masks[1]:SetPoint("TOPLEFT", f, "TOPLEFT", th, -th) - f.masks[1]:SetPoint("BOTTOMRIGHT", f, "BOTTOMRIGHT", -th, th) + f.masks[1]:SetPoint("TOPLEFT",f,"TOPLEFT",th,-th) + f.masks[1]:SetPoint("BOTTOMRIGHT",f,"BOTTOMRIGHT",-th,th) - if not (border == false) then + if not(border==false) then if not f.masks[2] then f.masks[2] = GlowMaskPool:Acquire() - f.masks[2]:SetTexture(textureList.empty, "CLAMPTOWHITE", "CLAMPTOWHITE") + f.masks[2]:SetTexture(textureList.empty, "CLAMPTOWHITE","CLAMPTOWHITE") end - f.masks[2]:SetPoint("TOPLEFT", f, "TOPLEFT", th + 1, -th - 1) - f.masks[2]:SetPoint("BOTTOMRIGHT", f, "BOTTOMRIGHT", -th - 1, th + 1) + f.masks[2]:SetPoint("TOPLEFT",f,"TOPLEFT",th+1,-th-1) + f.masks[2]:SetPoint("BOTTOMRIGHT",f,"BOTTOMRIGHT",-th-1,th+1) if not f.bg then f.bg = GlowTexPool:Acquire() - f.bg:SetColorTexture(0.1, 0.1, 0.1, 0.8) + f.bg:SetColorTexture(0.1,0.1,0.1,0.8) f.bg:SetParent(f) f.bg:SetAllPoints(f) - f.bg:SetDrawLayer("ARTWORK", 6) + f.bg:SetDrawLayer("ARTWORK",6) f.bg:AddMaskTexture(f.masks[2]) end else @@ -333,14 +334,14 @@ function lib.PixelGlow_Start(r, color, N, frequency, length, th, xOffset, yOffse f.masks[2] = nil end end - for _, tex in pairs(f.textures) do + for _,tex in pairs(f.textures) do if tex:GetNumMaskTextures() < 1 then tex:AddMaskTexture(f.masks[1]) end end f.timer = f.timer or 0 f.info = f.info or {} - f.info.step = 1 / N + f.info.step = 1/N f.info.period = period f.info.th = th if f.info.length ~= length then @@ -348,18 +349,18 @@ function lib.PixelGlow_Start(r, color, N, frequency, length, th, xOffset, yOffse f.info.length = length end pUpdate(f, 0) - f:SetScript("OnUpdate", pUpdate) + f:SetScript("OnUpdate",pUpdate) end -function lib.PixelGlow_Stop(r, key) +function lib.PixelGlow_Stop(r,key) if not r then return end key = key or "" - if not r["_PixelGlow" .. key] then + if not r["_PixelGlow"..key] then return false else - GlowFramePool:Release(r["_PixelGlow" .. key]) + GlowFramePool:Release(r["_PixelGlow"..key]) end end @@ -367,62 +368,61 @@ table.insert(lib.glowList, "Pixel Glow") lib.startList["Pixel Glow"] = lib.PixelGlow_Start lib.stopList["Pixel Glow"] = lib.PixelGlow_Stop --- Autocast Glow Functions-- -local function acUpdate(self, elapsed) - local width, height = self:GetSize() + +--Autocast Glow Functions-- +local function acUpdate(self,elapsed) + local width,height = self:GetSize() if width ~= self.info.width or height ~= self.info.height then - if width * height == 0 then - return - end -- Avoid division by zero + if width*height == 0 then return end -- Avoid division by zero self.info.width = width self.info.height = height - self.info.perimeter = 2 * (width + height) - self.info.bottomlim = height * 2 + width - self.info.rightlim = height + width - self.info.space = self.info.perimeter / self.info.N + self.info.perimeter = 2*(width+height) + self.info.bottomlim = height*2+width + self.info.rightlim = height+width + self.info.space = self.info.perimeter/self.info.N end local texIndex = 0; - for k = 1, 4 do - self.timer[k] = self.timer[k] + elapsed / (self.info.period * k) - if self.timer[k] > 1 or self.timer[k] < -1 then - self.timer[k] = self.timer[k] % 1 + for k=1,4 do + self.timer[k] = self.timer[k]+elapsed/(self.info.period*k) + if self.timer[k] > 1 or self.timer[k] <-1 then + self.timer[k] = self.timer[k]%1 end - for i = 1, self.info.N do - texIndex = texIndex + 1 - local position = (self.info.space * i + self.info.perimeter * self.timer[k]) % self.info.perimeter - if position > self.info.bottomlim then - self.textures[texIndex]:SetPoint("CENTER", self, "BOTTOMRIGHT", -position + self.info.bottomlim, 0) - elseif position > self.info.rightlim then - self.textures[texIndex]:SetPoint("CENTER", self, "TOPRIGHT", 0, -position + self.info.rightlim) - elseif position > self.info.height then - self.textures[texIndex]:SetPoint("CENTER", self, "TOPLEFT", position - self.info.height, 0) + for i = 1,self.info.N do + texIndex = texIndex+1 + local position = (self.info.space*i+self.info.perimeter*self.timer[k])%self.info.perimeter + if position>self.info.bottomlim then + self.textures[texIndex]: SetPoint("CENTER",self,"BOTTOMRIGHT",-position+self.info.bottomlim,0) + elseif position>self.info.rightlim then + self.textures[texIndex]: SetPoint("CENTER",self,"TOPRIGHT",0,-position+self.info.rightlim) + elseif position>self.info.height then + self.textures[texIndex]: SetPoint("CENTER",self,"TOPLEFT",position-self.info.height,0) else - self.textures[texIndex]:SetPoint("CENTER", self, "BOTTOMLEFT", 0, position) + self.textures[texIndex]: SetPoint("CENTER",self,"BOTTOMLEFT",0,position) end end end end -function lib.AutoCastGlow_Start(r, color, N, frequency, scale, xOffset, yOffset, key, frameLevel) +function lib.AutoCastGlow_Start(r,color,N,frequency,scale,xOffset,yOffset,key,frameLevel) if not r then return end if not color then - color = {0.95, 0.95, 0.32, 1} + color = {0.95,0.95,0.32,1} end - if not (N and N > 0) then + if not(N and N>0) then N = 4 end local period if frequency then - if not (frequency > 0 or frequency < 0) then + if not(frequency>0 or frequency<0) then period = 8 else - period = 1 / frequency + period = 1/frequency end else period = 8 @@ -432,33 +432,32 @@ function lib.AutoCastGlow_Start(r, color, N, frequency, scale, xOffset, yOffset, yOffset = yOffset or 0 key = key or "" - addFrameAndTex(r, color, "_AutoCastGlow", key, N * 4, xOffset, yOffset, textureList.shine, shineCoords, true, - frameLevel) - local f = r["_AutoCastGlow" .. key] - local sizes = {7, 6, 5, 4} - for k, size in pairs(sizes) do - for i = 1, N do - f.textures[i + N * (k - 1)]:SetSize(size * scale, size * scale) + addFrameAndTex(r,color,"_AutoCastGlow",key,N*4,xOffset,yOffset,textureList.shine,shineCoords, true, frameLevel) + local f = r["_AutoCastGlow"..key] + local sizes = {7,6,5,4} + for k,size in pairs(sizes) do + for i = 1,N do + f.textures[i+N*(k-1)]:SetSize(size*scale,size*scale) end end - f.timer = f.timer or {0, 0, 0, 0} + f.timer = f.timer or {0,0,0,0} f.info = f.info or {} f.info.N = N f.info.period = period - f:SetScript("OnUpdate", acUpdate) + f:SetScript("OnUpdate",acUpdate) acUpdate(f, 0) end -function lib.AutoCastGlow_Stop(r, key) +function lib.AutoCastGlow_Stop(r,key) if not r then return end key = key or "" - if not r["_AutoCastGlow" .. key] then + if not r["_AutoCastGlow"..key] then return false else - GlowFramePool:Release(r["_AutoCastGlow" .. key]) + GlowFramePool:Release(r["_AutoCastGlow"..key]) end end @@ -466,9 +465,9 @@ table.insert(lib.glowList, "Autocast Shine") lib.startList["Autocast Shine"] = lib.AutoCastGlow_Start lib.stopList["Autocast Shine"] = lib.AutoCastGlow_Stop --- Action Button Glow-- -local function ButtonGlowResetter(framePool, frame) - frame:SetScript("OnUpdate", nil) +--Action Button Glow-- +local function ButtonGlowResetter(framePool,frame) + frame:SetScript("OnUpdate",nil) local parent = frame:GetParent() if parent._ButtonGlow then parent._ButtonGlow = nil @@ -476,7 +475,7 @@ local function ButtonGlowResetter(framePool, frame) frame:Hide() frame:ClearAllPoints() end -local ButtonGlowPool = CreateFramePool("Frame", GlowParent, nil, ButtonGlowResetter) +local ButtonGlowPool = CreateFramePool("Frame",GlowParent,nil,ButtonGlowResetter) lib.ButtonGlowPool = ButtonGlowPool local function CreateScaleAnim(group, target, order, duration, x, y, delay) @@ -512,13 +511,13 @@ local function AnimIn_OnPlay(group) local frame = group:GetParent() local frameWidth, frameHeight = frame:GetSize() frame.spark:SetSize(frameWidth, frameHeight) - frame.spark:SetAlpha(not (frame.color) and 1.0 or 0.3 * frame.color[4]) + frame.spark:SetAlpha(not(frame.color) and 1.0 or 0.3*frame.color[4]) frame.innerGlow:SetSize(frameWidth / 2, frameHeight / 2) - frame.innerGlow:SetAlpha(not (frame.color) and 1.0 or frame.color[4]) - frame.innerGlowOver:SetAlpha(not (frame.color) and 1.0 or frame.color[4]) + frame.innerGlow:SetAlpha(not(frame.color) and 1.0 or frame.color[4]) + frame.innerGlowOver:SetAlpha(not(frame.color) and 1.0 or frame.color[4]) frame.outerGlow:SetSize(frameWidth * 2, frameHeight * 2) - frame.outerGlow:SetAlpha(not (frame.color) and 1.0 or frame.color[4]) - frame.outerGlowOver:SetAlpha(not (frame.color) and 1.0 or frame.color[4]) + frame.outerGlow:SetAlpha(not(frame.color) and 1.0 or frame.color[4]) + frame.outerGlowOver:SetAlpha(not(frame.color) and 1.0 or frame.color[4]) frame.ants:SetSize(frameWidth * 0.85, frameHeight * 0.85) frame.ants:SetAlpha(0) frame:Show() @@ -534,7 +533,7 @@ local function AnimIn_OnFinished(group) frame.outerGlow:SetSize(frameWidth, frameHeight) frame.outerGlowOver:SetAlpha(0.0) frame.outerGlowOver:SetSize(frameWidth, frameHeight) - frame.ants:SetAlpha(not (frame.color) and 1.0 or frame.color[4]) + frame.ants:SetAlpha(not(frame.color) and 1.0 or frame.color[4]) end local function AnimIn_OnStop(group) @@ -557,14 +556,14 @@ local function bgUpdate(self, elapsed) AnimateTexCoords(self.ants, 256, 256, 48, 48, 22, elapsed, self.throttle); local cooldown = self:GetParent().cooldown; local duration = cooldown and cooldown:IsShown() and cooldown:GetCooldownDuration() - if ((not issecretvalue or not issecretvalue(duration)) and duration and duration > 3000) then + if((not issecretvalue or not issecretvalue(duration)) and duration and duration > 3000) then self:SetAlpha(0.5); else self:SetAlpha(1.0); end end -local function configureButtonGlow(f, alpha) +local function configureButtonGlow(f,alpha) f.spark = f:CreateTexture(nil, "BACKGROUND") f.spark:SetPoint("CENTER") f.spark:SetAlpha(0) @@ -610,18 +609,18 @@ local function configureButtonGlow(f, alpha) f.animIn = f:CreateAnimationGroup() f.animIn.appear = {} f.animIn.fade = {} - CreateScaleAnim(f.animIn, "spark", 1, 0.2, 1.5, 1.5) - CreateAlphaAnim(f.animIn, "spark", 1, 0.2, 0, alpha, nil, true) - CreateScaleAnim(f.animIn, "innerGlow", 1, 0.3, 2, 2) - CreateScaleAnim(f.animIn, "innerGlowOver", 1, 0.3, 2, 2) - CreateAlphaAnim(f.animIn, "innerGlowOver", 1, 0.3, alpha, 0, nil, false) - CreateScaleAnim(f.animIn, "outerGlow", 1, 0.3, 0.5, 0.5) - CreateScaleAnim(f.animIn, "outerGlowOver", 1, 0.3, 0.5, 0.5) - CreateAlphaAnim(f.animIn, "outerGlowOver", 1, 0.3, alpha, 0, nil, false) - CreateScaleAnim(f.animIn, "spark", 1, 0.2, 2 / 3, 2 / 3, 0.2) - CreateAlphaAnim(f.animIn, "spark", 1, 0.2, alpha, 0, 0.2, false) - CreateAlphaAnim(f.animIn, "innerGlow", 1, 0.2, alpha, 0, 0.3, false) - CreateAlphaAnim(f.animIn, "ants", 1, 0.2, 0, alpha, 0.3, true) + CreateScaleAnim(f.animIn, "spark", 1, 0.2, 1.5, 1.5) + CreateAlphaAnim(f.animIn, "spark", 1, 0.2, 0, alpha, nil, true) + CreateScaleAnim(f.animIn, "innerGlow", 1, 0.3, 2, 2) + CreateScaleAnim(f.animIn, "innerGlowOver", 1, 0.3, 2, 2) + CreateAlphaAnim(f.animIn, "innerGlowOver", 1, 0.3, alpha, 0, nil, false) + CreateScaleAnim(f.animIn, "outerGlow", 1, 0.3, 0.5, 0.5) + CreateScaleAnim(f.animIn, "outerGlowOver", 1, 0.3, 0.5, 0.5) + CreateAlphaAnim(f.animIn, "outerGlowOver", 1, 0.3, alpha, 0, nil, false) + CreateScaleAnim(f.animIn, "spark", 1, 0.2, 2/3, 2/3, 0.2) + CreateAlphaAnim(f.animIn, "spark", 1, 0.2, alpha, 0, 0.2, false) + CreateAlphaAnim(f.animIn, "innerGlow", 1, 0.2, alpha, 0, 0.3, false) + CreateAlphaAnim(f.animIn, "ants", 1, 0.2, 0, alpha, 0.3, true) f.animIn:SetScript("OnPlay", AnimIn_OnPlay) f.animIn:SetScript("OnStop", AnimIn_OnStop) f.animIn:SetScript("OnFinished", AnimIn_OnFinished) @@ -630,39 +629,30 @@ local function configureButtonGlow(f, alpha) f.animOut.appear = {} f.animOut.fade = {} CreateAlphaAnim(f.animOut, "outerGlowOver", 1, 0.2, 0, alpha, nil, true) - CreateAlphaAnim(f.animOut, "ants", 1, 0.2, alpha, 0, nil, false) + CreateAlphaAnim(f.animOut, "ants", 1, 0.2, alpha, 0, nil, false) CreateAlphaAnim(f.animOut, "outerGlowOver", 2, 0.2, alpha, 0, nil, false) - CreateAlphaAnim(f.animOut, "outerGlow", 2, 0.2, alpha, 0, nil, false) - f.animOut:SetScript("OnFinished", function(self) - ButtonGlowPool:Release(self:GetParent()) - end) + CreateAlphaAnim(f.animOut, "outerGlow", 2, 0.2, alpha, 0, nil, false) + f.animOut:SetScript("OnFinished", function(self) ButtonGlowPool:Release(self:GetParent()) end) f:SetScript("OnHide", bgHide) end -local function updateAlphaAnim(f, alpha) - for _, anim in pairs(f.animIn.appear) do +local function updateAlphaAnim(f,alpha) + for _,anim in pairs(f.animIn.appear) do anim:SetToAlpha(alpha) end - for _, anim in pairs(f.animIn.fade) do + for _,anim in pairs(f.animIn.fade) do anim:SetFromAlpha(alpha) end - for _, anim in pairs(f.animOut.appear) do + for _,anim in pairs(f.animOut.appear) do anim:SetToAlpha(alpha) end - for _, anim in pairs(f.animOut.fade) do + for _,anim in pairs(f.animOut.fade) do anim:SetFromAlpha(alpha) end end -local ButtonGlowTextures = { - ["spark"] = true, - ["innerGlow"] = true, - ["innerGlowOver"] = true, - ["outerGlow"] = true, - ["outerGlowOver"] = true, - ["ants"] = true -} +local ButtonGlowTextures = {["spark"] = true,["innerGlow"] = true,["innerGlowOver"] = true,["outerGlow"] = true,["outerGlowOver"] = true,["ants"] = true} local function noZero(num) if num == 0 then @@ -672,36 +662,36 @@ local function noZero(num) end end -function lib.ButtonGlow_Start(r, color, frequency, frameLevel) +function lib.ButtonGlow_Start(r,color,frequency,frameLevel) if not r then return end - frameLevel = frameLevel or 8; + frameLevel = frameLevel or 8; local throttle if frequency and frequency > 0 then - throttle = 0.25 / frequency * 0.01 + throttle = 0.25/frequency*0.01 else throttle = 0.01 end if r._ButtonGlow then local f = r._ButtonGlow - local width, height = r:GetSize() - f:SetFrameLevel(r:GetFrameLevel() + frameLevel) - f:SetSize(width * 1.4, height * 1.4) + local width,height = r:GetSize() + f:SetFrameLevel(r:GetFrameLevel()+frameLevel) + f:SetSize(width*1.4 , height*1.4) f:SetPoint("TOPLEFT", r, "TOPLEFT", -width * 0.2, height * 0.2) f:SetPoint("BOTTOMRIGHT", r, "BOTTOMRIGHT", width * 0.2, -height * 0.2) - f.ants:SetSize(width * 1.4 * 0.85, height * 1.4 * 0.85) - AnimIn_OnFinished(f.animIn) - if f.animOut:IsPlaying() then + f.ants:SetSize(width*1.4*0.85, height*1.4*0.85) + AnimIn_OnFinished(f.animIn) + if f.animOut:IsPlaying() then f.animOut:Stop() f.animIn:Play() end - if not (color) then + if not(color) then for texture in pairs(ButtonGlowTextures) do f[texture]:SetDesaturated(nil) - f[texture]:SetVertexColor(1, 1, 1) - local alpha = math.min(f[texture]:GetAlpha() / noZero(f.color and f.color[4] or 1), 1) + f[texture]:SetVertexColor(1,1,1) + local alpha = math.min(f[texture]:GetAlpha()/noZero(f.color and f.color[4] or 1), 1) f[texture]:SetAlpha(alpha) updateAlphaAnim(f, 1) end @@ -713,11 +703,11 @@ function lib.ButtonGlow_Start(r, color, frequency, frameLevel) local r, g, b = color:GetRGBA() f[texture]:SetVertexColor(r, g, b) else - f[texture]:SetVertexColor(color[1], color[2], color[3]) + f[texture]:SetVertexColor(color[1],color[2],color[3]) end - local alpha = math.min(f[texture]:GetAlpha() / noZero(f.color and f.color[4] or 1) * color[4], 1) + local alpha = math.min(f[texture]:GetAlpha()/noZero(f.color and f.color[4] or 1)*color[4], 1) f[texture]:SetAlpha(alpha) - updateAlphaAnim(f, color and color[4] or 1) + updateAlphaAnim(f,color and color[4] or 1) end f.color = color end @@ -725,22 +715,22 @@ function lib.ButtonGlow_Start(r, color, frequency, frameLevel) else local f, new = ButtonGlowPool:Acquire() if new then - configureButtonGlow(f, color and color[4] or 1) + configureButtonGlow(f,color and color[4] or 1) else - updateAlphaAnim(f, color and color[4] or 1) + updateAlphaAnim(f,color and color[4] or 1) end r._ButtonGlow = f - local width, height = r:GetSize() + local width,height = r:GetSize() f:SetParent(r) - f:SetFrameLevel(r:GetFrameLevel() + frameLevel) + f:SetFrameLevel(r:GetFrameLevel()+frameLevel) f:SetSize(width * 1.4, height * 1.4) f:SetPoint("TOPLEFT", r, "TOPLEFT", -width * 0.2, height * 0.2) f:SetPoint("BOTTOMRIGHT", r, "BOTTOMRIGHT", width * 0.2, -height * 0.2) - if not (color) then + if not(color) then f.color = false for texture in pairs(ButtonGlowTextures) do f[texture]:SetDesaturated(nil) - f[texture]:SetVertexColor(1, 1, 1) + f[texture]:SetVertexColor(1,1,1) end else f.color = color @@ -750,7 +740,7 @@ function lib.ButtonGlow_Start(r, color, frequency, frameLevel) local r, g, b = color:GetRGBA() f[texture]:SetVertexColor(r, g, b) else - f[texture]:SetVertexColor(color[1], color[2], color[3]) + f[texture]:SetVertexColor(color[1],color[2],color[3]) end end end @@ -784,6 +774,7 @@ table.insert(lib.glowList, "Action Button Glow") lib.startList["Action Button Glow"] = lib.ButtonGlow_Start lib.stopList["Action Button Glow"] = lib.ButtonGlow_Stop + -- ProcGlow local function ProcGlowResetter(framePool, frame) @@ -934,9 +925,7 @@ function lib.ProcGlow_Start(r, options) return end options = options or {} - setmetatable(options, { - __index = ProcGlowDefaults - }) + setmetatable(options, { __index = ProcGlowDefaults }) local key = "_ProcGlow" .. options.key local f, new if r[key] then From 3b312b34160fd5e01a9fa03d6fe956867cde5cb8 Mon Sep 17 00:00:00 2001 From: muleyo Date: Sat, 14 Feb 2026 23:25:32 +0100 Subject: [PATCH 3/3] MINOR_VERSION +1 --- LibCustomGlow-1.0.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/LibCustomGlow-1.0.lua b/LibCustomGlow-1.0.lua index 5e0d423..4d8c684 100644 --- a/LibCustomGlow-1.0.lua +++ b/LibCustomGlow-1.0.lua @@ -6,7 +6,7 @@ https://www.wowace.com/projects/libbuttonglow-1-0 -- luacheck: globals CreateFromMixins ObjectPoolMixin CreateTexturePool CreateFramePool local MAJOR_VERSION = "LibCustomGlow-1.0" -local MINOR_VERSION = 24 +local MINOR_VERSION = 25 local _, ns = ... local lib if ns.LCG then @@ -963,3 +963,4 @@ lib.startList["Proc Glow"] = lib.ProcGlow_Start lib.stopList["Proc Glow"] = lib.ProcGlow_Stop ns.LCG = lib +