View Single Post
10-16-14, 11:13 AM   #15
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Err. There is actually no get method for the swipe color. Grmpf.

Here is my working fix for now.

lua Code:
  1. --cooldown spiral alpha fix
  2.  
  3.   --SetCooldownSwipeAlpha
  4.   local function SetCooldownSwipeAlpha(self,cooldown,alpha)
  5.     cooldown:SetSwipeColor(0,0,0,0.8*alpha)
  6.   end
  7.    
  8.   --ApplyButtonCooldownAlphaFix
  9.   local function ApplyButtonCooldownAlphaFix(button)
  10.     if not button then return end
  11.     if not button.cooldown then return end
  12.     local parent = button:GetParent():GetParent()
  13.     hooksecurefunc(parent, "SetAlpha", function(self,alpha) SetCooldownSwipeAlpha(self,button.cooldown,alpha) end)
  14.   end
  15.    
  16.   do
  17.     --style the actionbar buttons
  18.     for i = 1, NUM_ACTIONBAR_BUTTONS do
  19.       ApplyButtonCooldownAlphaFix(_G["ActionButton"..i])
  20.       ApplyButtonCooldownAlphaFix(_G["MultiBarBottomLeftButton"..i])
  21.       ApplyButtonCooldownAlphaFix(_G["MultiBarBottomRightButton"..i])
  22.       ApplyButtonCooldownAlphaFix(_G["MultiBarRightButton"..i])
  23.       ApplyButtonCooldownAlphaFix(_G["MultiBarLeftButton"..i])
  24.     end
  25.     --override buttons
  26.     for i = 1, 6 do
  27.       ApplyButtonCooldownAlphaFix(_G["OverrideActionBarButton"..i])
  28.     end
  29.     --petbar buttons
  30.     for i=1, NUM_PET_ACTION_SLOTS do
  31.       ApplyButtonCooldownAlphaFix(_G["PetActionButton"..i])
  32.     end
  33.     --stancebar buttons
  34.     for i=1, NUM_STANCE_SLOTS do
  35.       ApplyButtonCooldownAlphaFix(_G["StanceButton"..i])
  36.     end
  37.     --possess buttons
  38.     for i=1, NUM_POSSESS_SLOTS do
  39.       ApplyButtonCooldownAlphaFix(_G["PossessButton"..i])
  40.     end
  41.   end
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 10-16-14 at 11:34 AM.
  Reply With Quote