Hi all
I am looking for a bit of help with a cooldown button.
Here is my current code.
Code:
local testIconButton = CreateFrame("Button","testIconButton",UIParent)
testIconButton:SetSize(50,50)
testIconButton:ClearAllPoints()
testIconButton:SetPoint("CENTER")
testIconButton:SetNormalTexture("Interface\\Buttons\\UI-GroupLoot-DE-Up")
testIconButton:SetDisabledTexture("Interface\\Buttons\\UI-GroupLoot-DE-Highlight")
testIconButton:SetMovable(true)
testIconButton:SetClampedToScreen(true)
testIconButton:RegisterForDrag("RightButton")
testIconButton:SetScript("OnDragStart",testIconButton.StartMoving)
testIconButton:SetScript("OnDragStop",testIconButton.StopMovingOrSizing)
testIconButton:SetToplevel(true)
testIconButton:SetScript("OnClick",function(self)
testIconButton:Disable()
testIconButtonCooldown:SetCooldown(GetTime(),10)
C_Timer.After(10,function()
testIconButton:Enable()
end)
end)
local testIconButtonCooldown = CreateFrame("Cooldown","testIconButtonCooldown",testIconButton,"CooldownFrameTemplate")
Here the current result.
What I want is to have the cooldown text to display seconds instead of milliseconds, and have either a cooldown that masks to the non-alpha or a round round cooldown instead of the square.
Any help will be great.