Skip to content

Commit

Permalink
Merge pull request #580 from Flamanis/AnimIn-fixes
Browse files Browse the repository at this point in the history
Add animIn/animOut checks for the welcome window
  • Loading branch information
Tercioo authored Jul 29, 2023
2 parents 89e6ffd + ed1aa69 commit 0bcc58b
Showing 1 changed file with 52 additions and 9 deletions.
61 changes: 52 additions & 9 deletions frames/window_welcome.lua
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,19 @@ function _detalhes:OpenWelcomeWindow()
local frame_alert = CreateFrame("frame", nil, window)
frame_alert:SetPoint("topright", window)
function _detalhes:StopPlayStretchAlert()
frame_alert.alert.animIn:Stop()
frame_alert.alert.animOut:Play()
if (frame_alert.alert.animOut) then
if (not frame_alert.alert.animOut:IsPlaying()) then
frame_alert.alert.animOut:Stop()
frame_alert.alert.animOut:Play()
end
if (not frame_alert.alert.animIn:IsPlaying()) then
frame_alert.alert.animIn:Stop()
end
elseif (frame_alert.alert.ProcStartAnim) then
if (not frame_alert.alert.ProcStartAnim:IsPlaying()) then
frame_alert.alert.ProcStartAnim:Stop()
end
end
_detalhes.stopwelcomealert = nil
end
frame_alert.alert = CreateFrame("frame", "DetailsWelcomeWindowAlert", UIParent, "ActionBarButtonSpellActivationAlert")
Expand Down Expand Up @@ -1120,9 +1131,19 @@ local window_openned_at = time()
instance.baseframe.button_stretch:SetAlpha(1)
frame_alert.alert:SetPoint("topleft", instance.baseframe.button_stretch, "topleft", -20, 6)
frame_alert.alert:SetPoint("bottomright", instance.baseframe.button_stretch, "bottomright", 20, -14)

frame_alert.alert.animOut:Stop()
frame_alert.alert.animIn:Play()
if (frame_alert.alert.animOut) then
if (frame_alert.alert.animOut:IsPlaying()) then
frame_alert.alert.animOut:Stop()
end
if (not frame_alert.alert.animIn:IsPlaying()) then
frame_alert.alert.animIn:Stop()
frame_alert.alert.animIn:Play()
end
elseif (frame_alert.alert.ProcStartAnim) then
if (not frame_alert.alert.ProcStartAnim:IsPlaying()) then
frame_alert.alert.ProcStartAnim:Play()
end
end
if (_detalhes.stopwelcomealert) then
_detalhes:CancelTimer(_detalhes.stopwelcomealert)
end
Expand Down Expand Up @@ -1178,8 +1199,19 @@ local window_openned_at = time()
frame_alert.alert:SetPoint("topleft", instance.baseframe.cabecalho.modo_selecao.widget, "topleft", -8, 6)
frame_alert.alert:SetPoint("bottomright", instance.baseframe.cabecalho.modo_selecao.widget, "bottomright", 8, -6)

frame_alert.alert.animOut:Stop()
frame_alert.alert.animIn:Play()
if (frame_alert.alert.animOut) then
if (frame_alert.alert.animOut:IsPlaying()) then
frame_alert.alert.animOut:Stop()
end
if (not frame_alert.alert.animIn:IsPlaying()) then
frame_alert.alert.animIn:Stop()
frame_alert.alert.animIn:Play()
end
elseif (frame_alert.alert.ProcStartAnim) then
if (not frame_alert.alert.ProcStartAnim:IsPlaying()) then
frame_alert.alert.ProcStartAnim:Play()
end
end
if (_detalhes.stopwelcomealert) then
_detalhes:CancelTimer(_detalhes.stopwelcomealert)
end
Expand Down Expand Up @@ -1412,8 +1444,19 @@ local window_openned_at = time()
frame_alert.alert:SetPoint("topleft", bar1, "topleft", -60, 8)
frame_alert.alert:SetPoint("bottomright", bar1, "bottomright", 60, -10)

frame_alert.alert.animOut:Stop()
frame_alert.alert.animIn:Play()
if (frame_alert.alert.animOut) then
if (frame_alert.alert.animOut:IsPlaying()) then
frame_alert.alert.animOut:Stop()
end
if (not frame_alert.alert.animIn:IsPlaying()) then
frame_alert.alert.animIn:Stop()
frame_alert.alert.animIn:Play()
end
elseif (frame_alert.alert.ProcStartAnim) then
if (not frame_alert.alert.ProcStartAnim:IsPlaying()) then
frame_alert.alert.ProcStartAnim:Play()
end
end
if (_detalhes.stopwelcomealert) then
_detalhes:CancelTimer(_detalhes.stopwelcomealert)
end
Expand Down

0 comments on commit 0bcc58b

Please sign in to comment.