Skip to content

Commit

Permalink
Framework Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Jul 14, 2023
1 parent 7a0e045 commit e2e2369
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 33 deletions.
88 changes: 57 additions & 31 deletions Libs/DF/fw.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


local dversion = 447
local dversion = 448
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary(major, minor)

Expand Down Expand Up @@ -3721,21 +3721,36 @@ local glow_overlay_play = function(self)
if (not self:IsShown()) then
self:Show()
end
if (self.animOut:IsPlaying()) then
self.animOut:Stop()
end
if (not self.animIn:IsPlaying()) then
self.animIn:Stop()
self.animIn:Play()
if (self.animOut) then
if (self.animOut:IsPlaying()) then
self.animOut:Stop()
end
if (not self.animIn:IsPlaying()) then
self.animIn:Stop()
self.animIn:Play()
end
elseif (self.ProcStartAnim) then
if (not self.ProcStartAnim:IsPlaying()) then
self.ProcStartAnim:Play()
end
if (not self.ProcLoop:IsPlaying()) then
--self.ProcLoop:Play()
end
end
end

local glow_overlay_stop = function(self)
if (self.animOut:IsPlaying()) then
self.animOut:Stop()
end
if (self.animIn:IsPlaying()) then
self.animIn:Stop()
if (self.animOut) then
if (self.animOut:IsPlaying()) then
self.animOut:Stop()
end
if (self.animIn:IsPlaying()) then
self.animIn:Stop()
end
elseif (self.ProcStartAnim) then
if (self.ProcStartAnim:IsPlaying()) then
self.ProcStartAnim:Stop()
end
end
if (self:IsShown()) then
self:Hide()
Expand All @@ -3745,20 +3760,27 @@ end
local glow_overlay_setcolor = function(self, antsColor, glowColor)
if (antsColor) then
local r, g, b, a = DF:ParseColors(antsColor)
self.ants:SetVertexColor(r, g, b, a)
self.AntsColor.r = r
self.AntsColor.g = g
self.AntsColor.b = b
self.AntsColor.a = a
self.AntsColor = {r, g, b, a}
if (self.ants) then
self.ants:SetVertexColor(r, g, b, a)
elseif (self.ProcLoopFlipbook) then
self.ProcLoopFlipbook:SetVertexColor(r, g, b) --no alpha because of animation
local anim1 = self.ProcLoop:GetAnimations()
anim1:SetToAlpha(a)
end
end

if (glowColor) then
local r, g, b, a = DF:ParseColors(glowColor)
self.outerGlow:SetVertexColor(r, g, b, a)
self.GlowColor.r = r
self.GlowColor.g = g
self.GlowColor.b = b
self.GlowColor.a = a
self.GlowColor = {r, g, b, a}
if (self.outerGlow) then
self.outerGlow:SetVertexColor(r, g, b, a)
elseif (self.ProcStartFlipbook) then
self.ProcStartFlipbook:SetVertexColor(r, g, b) --no alpha because of animation
local anim1, anim2, anim3 = self.ProcStartAnim:GetAnimations()
anim1:SetToAlpha(a)
anim3:SetFromAlpha(a)
end
end
end

Expand All @@ -3785,6 +3807,8 @@ function DF:CreateGlowOverlay (parent, antsColor, glowColor)
glowFrame.Stop = glow_overlay_stop
glowFrame.SetColor = glow_overlay_setcolor

glowFrame:SetColor(antsColor, glowColor)

glowFrame:Hide()

parent.overlay = glowFrame
Expand All @@ -3797,15 +3821,17 @@ function DF:CreateGlowOverlay (parent, antsColor, glowColor)
parent.overlay:SetPoint("TOPLEFT", parent, "TOPLEFT", -frameWidth * 0.32, frameHeight * 0.36)
parent.overlay:SetPoint("BOTTOMRIGHT", parent, "BOTTOMRIGHT", frameWidth * 0.32, -frameHeight * 0.36)

local r, g, b, a = DF:ParseColors(antsColor)
glowFrame.ants:SetVertexColor(r, g, b, a)
glowFrame.AntsColor = {r, g, b, a}

local r, g, b, a = DF:ParseColors(glowColor)
glowFrame.outerGlow:SetVertexColor(r, g, b, a)
glowFrame.GlowColor = {r, g, b, a}

glowFrame.outerGlow:SetScale(1.2)
if (glowFrame.outerGlow) then
glowFrame.outerGlow:SetScale(1.2)
end
if (glowFrame.ProcStartFlipbook) then
glowFrame.ProcStartAnim:Stop()
glowFrame.ProcStartFlipbook:ClearAllPoints()
--glowFrame.ProcStartFlipbook:SetAllPoints()
--glowFrame.ProcStartFlipbook:SetSize(frameWidth * scale, frameHeight * scale)
glowFrame.ProcStartFlipbook:SetPoint("TOPLEFT", glowFrame, "TOPLEFT", -frameWidth * scale, frameHeight * scale)
glowFrame.ProcStartFlipbook:SetPoint("BOTTOMRIGHT", glowFrame, "BOTTOMRIGHT", frameWidth * scale, -frameHeight * scale)
end
glowFrame:EnableMouse(false)
return glowFrame
end
Expand Down
4 changes: 2 additions & 2 deletions boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
local addonName, Details222 = ...
local version, build, date, tocversion = GetBuildInfo()

Details.build_counter = 11700
Details.alpha_build_counter = 11700 --if this is higher than the regular counter, use it instead
Details.build_counter = 11701
Details.alpha_build_counter = 11701 --if this is higher than the regular counter, use it instead
Details.dont_open_news = true
Details.game_version = version
Details.userversion = version .. " " .. Details.build_counter
Expand Down

0 comments on commit e2e2369

Please sign in to comment.