Thread Tools Display Modes
Prev Previous Post   Next Post Next
02-11-11, 02:53 PM   #21
sacrife
An Onyxian Warder
 
sacrife's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 384
Maybe we should try hooking the barPrototype:ApplyStyle from DBT.lua instead?

I tried but couldn't really get it to work as I don't understand hooking properly.

ATM I just edit the DBT.lua every time by adding these lines at the bottom of the "function barPrototype:ApplyStyle()" (Starts around line 630+)

I still want to edit the width, height and positions of the DBM elements manually in LUA as well. (I really hate savedvariables) With this I could also move the bars depending on where I am (PvP or Raid/Dungeon).

Code:
lua Code:
  1. -- Edit
  2.     local blankTex = "Interface\\Buttons\\WHITE8x8"
  3.     local backdrop = {bgFile = blankTex, edgeFile = blankTex, edgeSize = 1, insets = { left = 0, right = 0, top = 0, bottom = 0}}
  4.    
  5.     icon1:SetTexCoord(.07, .93, .07, .93)
  6.     icon1:SetWidth(17) -- barheight
  7.     icon1:SetHeight(17) -- barheight
  8.     icon1:SetPoint("RIGHT",frame,"LEFT",-3,0)
  9.     icon1.IconGlow = CreateFrame("Frame", nil, frame)
  10.     icon1.IconGlow:SetPoint("TOPLEFT", icon1, "TOPLEFT", -1, 1)
  11.     icon1.IconGlow:SetPoint("BOTTOMRIGHT", icon1, "BOTTOMRIGHT", 1, -1)
  12.     icon1.IconGlow:SetBackdrop(backdrop)
  13.     icon1.IconGlow:SetBackdropColor(0,0,0,0)
  14.     icon1.IconGlow:SetBackdropBorderColor(0,0,0,1) 
  15.     icon1.IconGlow:SetFrameLevel(0)
  16.    
  17.     local barbg = _G[frame:GetName().."BarBackground"]
  18.     barbg:SetAlpha(0)
  19.    
  20.     bar.Border = CreateFrame("Frame", nil, frame)
  21.     bar.Border:SetPoint("TOPLEFT", bar, "TOPLEFT", -1, 1)
  22.     bar.Border:SetPoint("BOTTOMRIGHT", bar, "BOTTOMRIGHT", 1, -1)
  23.     bar.Border:SetBackdrop(backdrop)
  24.     bar.Border:SetBackdropColor(0.17,0.17,0.17,1)
  25.     bar.Border:SetBackdropBorderColor(0,0,0,1) 
  26.     bar.Border:SetFrameLevel(0)
  27.    
  28.     name:SetFont("Interface\\Addons\\!shakes\\fonts\\fieryturk.TTF", 8, "OUTLINEMONOCHROME")
  29.     name:SetPoint("LEFT",2.5,0)
  30.     timer:SetFont("Interface\\Addons\\!shakes\\fonts\\fieryturk.TTF", 8, "OUTLINEMONOCHROME")
  31.     timer:SetPoint("RIGHT",0,0)
  32.     texture:SetTexture("Interface\\AddOns\\!shakes\\textures\\tap2.tga")
Attached Thumbnails
Click image for larger version

Name:	dbm_bars.png
Views:	1535
Size:	12.1 KB
ID:	5741  
__________________


Last edited by sacrife : 02-11-11 at 02:59 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