View Single Post
05-02-20, 06:25 PM   #5
MinguasBeef
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: May 2019
Posts: 51
Originally Posted by Fizzlemizz View Post
Any reason you're not using the CooldownFrameTemplate?

Lua Code:
  1. local f = CreateFrame("FRAME")
  2. f:SetWidth(32)
  3. f:SetHeight(32)
  4. f:SetPoint("CENTER")
  5.  
  6. local cdFrame = CreateFrame("Cooldown", "MyCdFrame", f,  "CooldownFrameTemplate")
  7. cdFrame:SetAllPoints(f)
  8. cdFrame:SetSwipeColor(1, 1, 1)
  9.  
  10. local texture = f:CreateTexture(nil, "BACKGROUND")
  11. texture:SetAllPoints(f)
  12. texture:SetTexCoord(0.07,0.9,0.07,0.90)
  13. texture:SetTexture(132242)
  14.  
  15. f:Show()
  16.  
  17. MyCdFrame:SetCooldown(GetTime(), 10)

Code:
/run MyCdFrame:SetCooldown(GetTime(), 10)
to play it over.
Ah, this was the issue! Thanks!

I was porting some old stuff that was compatible with the 2.4.3 client and it did not use that template. I didn't even know about it. Ty!
  Reply With Quote