Thread Tools Display Modes
Prev Previous Post   Next Post Next
01-01-17, 02:27 AM   #1
Walkerbo
A Cobalt Mageweaver
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 233
Seeking help with cooldowns

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.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Seeking help with cooldowns


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off