Thread Tools Display Modes
05-28-17, 07:50 PM   #1
galvin
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 265
Cooldown:SetSwipeTexture() help

This code should show a blue ring growing longer in a circle.
This is based off the runebar code in 7.2.5 for deathknights.
Be sure to have omniCC turned off since this breaks the animation.


But for some reason the ring is coming in as dark grey. I must be missing something.

Code:
DKTestScaleFrame = DKTestScaleFrame or CreateFrame('Frame')
DKTestScaleFrame:ClearAllPoints()
DKTestScaleFrame:SetPoint('LEFT')
DKTestScaleFrame:SetSize(100, 100)

DKTestScaleFrame:SetScale(1)

DKTestFrame = DKTestFrame or CreateFrame('Frame', nil, DKTestScaleFrame)

DKTestFrame:ClearAllPoints()
DKTestFrame:SetPoint('CENTER')
DKTestFrame:SetSize(100, 100)

DKTestTexture = DKTestFrame:CreateTexture(nil, 'OVERLAY')
DKTestTexture:SetAtlas([[DK-Rune-CD]])
DKTestTexture:SetAllPoints()


CooldownTestFrame = CooldownTestFrame or CreateFrame('Cooldown', nil, DKTestFrame, 'CooldownFrameTemplate')

CooldownTestFrame:ClearAllPoints()
CooldownTestFrame:SetPoint('CENTER', DKTestFrame, 'CENTER')

CooldownTestFrame:SetReverse(true)
CooldownTestFrame:SetSwipeTexture([[Interface\PlayerFrame\DK-Frost-Rune-CDFill]])
CooldownTestFrame:SetEdgeTexture([[Interface\PlayerFrame\DK-BloodUnholy-Rune-CDSpark]])


CooldownTestFrame:SetDrawEdge(true)
CooldownTestFrame:SetDrawBling(false)
CooldownTestFrame:SetHideCountdownNumbers(true)

CooldownTestFrame:SetSize(100, 100)


CooldownTestFrame:SetCooldown(GetTime(), 10)

Last edited by galvin : 05-28-17 at 09:09 PM.
  Reply With Quote
05-28-17, 09:25 PM   #2
MunkDev
A Scalebane Royal Guard
 
MunkDev's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 431
Maybe:
Lua Code:
  1. Cooldown:SetSwipeColor(r, g, b, [a])
  2. Cooldown:SetSwipeColor(1, 1, 1, 1) -- fully opaque, no color blending
__________________
  Reply With Quote
05-28-17, 10:14 PM   #3
galvin
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 265
Thanks, it fixed it! I knew it had to be something
  Reply With Quote
06-01-17, 12:33 PM   #4
StormFX
A Flamescale Wyrmkin
 
StormFX's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 109
Keep in mind that, depending on the type of button, the game will actually override the swipe colors in certain conditions. Eg, ActionButton.lua calls :SetSwipeColor(0, 0, 0) on events related to loss-of-control.
  Reply With Quote

WoWInterface » PTR » PTR General Discussion » Cooldown:SetSwipeTexture() help

Thread Tools
Display Modes

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