WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   PTR General Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=172)
-   -   Cooldown:SetSwipeTexture() help (https://www.wowinterface.com/forums/showthread.php?t=55420)

galvin 05-28-17 07:50 PM

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)


MunkDev 05-28-17 09:25 PM

Maybe:
Lua Code:
  1. Cooldown:SetSwipeColor(r, g, b, [a])
  2. Cooldown:SetSwipeColor(1, 1, 1, 1) -- fully opaque, no color blending

galvin 05-28-17 10:14 PM

Thanks, it fixed it! I knew it had to be something :)

StormFX 06-01-17 12:33 PM

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.


All times are GMT -6. The time now is 07:30 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI