Thread Tools Display Modes
Prev Previous Post   Next Post Next
06-17-10, 05:49 AM   #1
Wildbreath
A Cyclonian
 
Wildbreath's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 46
How to skin Deadly Boss Mods (without rewriting)

lua Code:
  1. if DBM then
  2.       hooksecurefunc(DBT, "CreateBar", function(self)
  3.          for bar in self:GetBarIterator() do            
  4.             local frame = bar.frame
  5.             frame:SetScale(UIParent:GetScale())            
  6.             local tbar = getglobal(frame:GetName().."Bar")
  7.             local texture = getglobal(frame:GetName().."BarTexture")
  8.             local icon1 = getglobal(frame:GetName().."BarIcon1")
  9.             local icon2 = getglobal(frame:GetName().."BarIcon2")
  10.             local name = getglobal(frame:GetName().."BarName")
  11.             local timer = getglobal(frame:GetName().."BarTimer")
  12.             tbar:SetHeight(16)
  13.             texture:SetTexture(settings.texture)
  14.             texture.SetTexture = function() end
  15.             icon1:SetTexCoord(.1,.9,.1,.9)
  16.             icon2:SetTexCoord(.1,.9,.1,.9)
  17.             name:SetPoint("CENTER")
  18.             name:SetPoint("LEFT", 4, 0)
  19.             name:SetFont(settings.font, settings.fsize, "OUTLINE")
  20.             name.SetFont = function() end
  21.             timer:SetPoint("CENTER")
  22.             timer:SetPoint("RIGHT", -4, 0)
  23.             timer:SetFont(settings.font, settings.fsize, "OUTLINE")
  24.             timer.SetFont = function() end
  25.          end
  26.       end)
  27.  
  28.       hooksecurefunc(DBM.BossHealth, "AddBoss", function(cId, name)
  29.          local i = 1
  30.          while (_G[format("DBM_BossHealth_Bar_%d", i)]) do
  31.             local bar = _G[format("DBM_BossHealth_Bar_%d", i)]
  32.             local background = _G[bar:GetName().."BarBorder"]
  33.             local progress = _G[bar:GetName().."Bar"]
  34.             local name = _G[bar:GetName().."BarName"]
  35.             local timer = _G[bar:GetName().."BarTimer"]
  36.             bar:SetScale(UIParent:GetScale())
  37.             bar:SetHeight(16)
  38.             background:SetNormalTexture(nil)
  39.             progress:SetStatusBarTexture(settings.texture)
  40.             progress:SetPoint("TOPLEFT", bar, "TOPLEFT", 2, -2)
  41.             progress:SetPoint("BOTTOMRIGHT", bar, "BOTTOMRIGHT", -2, 2)
  42.             progress:SetPoint("BOTTOMRIGHT", bar, "BOTTOMRIGHT", -2, 2)
  43.             name:SetPoint("CENTER")
  44.             name:SetPoint("LEFT", 4, 0)
  45.             name:SetFont(settings.font, settings.fsize, "OUTLINE")
  46.             timer:SetPoint("CENTER")
  47.             timer:SetPoint("RIGHT", -4, 0)
  48.             timer:SetFont(settings.font, settings.fsize, "OUTLINE")
  49.             i = i + 1
  50.          end
  51.       end)
  52.    end
where settings.font, fsize, texture - own media
enjoy

Last edited by Wildbreath : 09-05-10 at 10:40 PM.
  Reply With Quote
 

WoWInterface » Developer Discussions » Tutorials & Other Helpful Info. » How to skin Deadly Boss Mods (without rewriting)


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