WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   How to skin a PallyPower (https://www.wowinterface.com/forums/showthread.php?t=34366)

Wildbreath 08-07-10 06:23 PM

How to skin a PallyPower
 
Code:

if PallyPower then
  hooksecurefunc(PallyPower, "UpdateLayout", function()
      if not PallyPower then return end
     
      local stylef(f)
        f:SetBackdrop({
                  bgFile = "Interface\\Buttons\\WHITE8x8",
                  edgeFile = "Interface\\Buttons\\WHITE8x8",
                  tile = false,
                  tileSize = 0,
                  edgeSize = 1,
                  insets = {left =-1, right =-1, top =-1, bottom =-1},
              })
        f:SetBackdropColor(0, 0, 0, 0.85)
        f:SetBackdropBorderColor(0, 0, 0)
      end
     
      stylef(_G[PallyPowerAuto])
      stylef(_G[PallyPowerRF])
      stylef(_G[PallyPowerAura])
      _G["PallyPowerAuraIcon"]:SetTexCoord(.1,.9,.1,.9)
      _G["PallyPowerRFIcon"]:SetTexCoord(.1,.9,.1,.9)
      _G["PallyPowerAutoIcon"]:SetTexCoord(.1,.9,.1,.9)
     
      if PallyPower.classButtons then
        for i = 1, PALLYPOWER_MAXCLASSES do
            local cBtn = PallyPower.classButtons[i]
            stylef(cBtn)
            local classIcon = _G[cBtn:GetName().."ClassIcon"]
            local buffIcon = _G[cBtn:GetName().."BuffIcon"]
            classIcon:SetTexCoord(.1,.9,.1,.9)
            buffIcon:SetTexCoord(.1,.9,.1,.9)
           
            for j = 1, PALLYPOWER_MAXPERCLASS do
              local pBtn = PallyPower.playerButtons[i][j]
              buffIcon = _G[pBtn:GetName().."BuffIcon"]
              buffIcon:SetTexCoord(.1,.9,.1,.9)
              stylef(pBtn)
            end
        end
      end
  end)
end

:rolleyes:


All times are GMT -6. The time now is 04:36 AM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI